public interface SubjectDAO
SubjectDAO
is responsible for persisting a Subject instance's internal state such that the Subject instance
can be recreated at a later time if necessary.
Shiro's default SecurityManager
implementations typically use a SubjectDAO
in conjunction
with a SubjectFactory
: after the SubjectFactory
creates a Subject
instance, the
SubjectDAO
is used to persist that subject's state such that it can be accessed later if necessary.
SecurityManager
implementations to manage Subject
state persistence. It does not make Subject instances accessible to the
application (e.g. via SecurityUtils.getSubject()
).DefaultSubjectDAO
Modifier and Type | Method and Description |
---|---|
void |
delete(Subject subject)
Removes any persisted state for the specified
Subject instance. |
Subject |
save(Subject subject)
Persists the specified Subject's state for later access.
|
Subject save(Subject subject)
Subject
,
this method updates the existing state to reflect the current state (i.e. an update operation).subject
- the Subject instance for which its state will be created or updated.Copyright © 2004-2016 The Apache Software Foundation. All Rights Reserved.