public class JawnRememberMeManager
extends org.apache.shiro.mgt.AbstractRememberMeManager
| Modifier and Type | Field and Description |
|---|---|
protected net.javapla.jawn.core.http.Cookie |
cookie |
static java.lang.String |
DEFAULT_REMEMBER_ME_COOKIE_NAME
The default name of the underlying rememberMe cookie which is
jawnRememberMe. |
static java.lang.String |
IDENTITY_REMOVED_KEY |
| Constructor and Description |
|---|
JawnRememberMeManager()
Constructs a new
CookieRememberMeManager with a default rememberMe cookie template. |
| Modifier and Type | Method and Description |
|---|---|
protected void |
forgetIdentity(org.apache.shiro.subject.Subject subject) |
void |
forgetIdentity(org.apache.shiro.subject.SubjectContext subjectContext) |
net.javapla.jawn.core.http.Cookie |
getCookie()
Returns the cookie 'template' that will be used to set all attributes of outgoing rememberMe cookies created by
this
RememberMeManager. |
protected byte[] |
getRememberedSerializedIdentity(org.apache.shiro.subject.SubjectContext subjectContext)
Returns a previously serialized identity byte array or
null if the byte array could not be acquired. |
protected java.lang.String |
readCookieValue(net.javapla.jawn.core.http.Context context) |
protected void |
rememberSerializedIdentity(org.apache.shiro.subject.Subject subject,
byte[] serialized)
Base64-encodes the specified serialized byte array and sets that base64-encoded String as the cookie value.
|
void |
setCookie(net.javapla.jawn.core.http.Cookie cookie)
Sets the cookie 'template' that will be used to set all attributes of outgoing rememberMe cookies created by
this
RememberMeManager. |
convertBytesToPrincipals, convertPrincipalsToBytes, decrypt, deserialize, encrypt, getCipherKey, getCipherService, getDecryptionCipherKey, getEncryptionCipherKey, getIdentityToRemember, getRememberedPrincipals, getSerializer, isRememberMe, onFailedLogin, onLogout, onRememberedPrincipalFailure, onSuccessfulLogin, rememberIdentity, rememberIdentity, serialize, setCipherKey, setCipherService, setDecryptionCipherKey, setEncryptionCipherKey, setSerializerpublic static final java.lang.String DEFAULT_REMEMBER_ME_COOKIE_NAME
jawnRememberMe.public static final java.lang.String IDENTITY_REMOVED_KEY
protected net.javapla.jawn.core.http.Cookie cookie
public JawnRememberMeManager()
CookieRememberMeManager with a default rememberMe cookie template.public net.javapla.jawn.core.http.Cookie getCookie()
RememberMeManager. Outgoing cookies will match this one except for the
value attribute, which is necessarily set dynamically at runtime.
Please see the class-level JavaDoc for the default cookie's attribute values.RememberMeManager.public void setCookie(net.javapla.jawn.core.http.Cookie cookie)
RememberMeManager. Outgoing cookies will match this one except for the
value attribute, which is necessarily set dynamically at runtime.
Please see the class-level JavaDoc for the default cookie's attribute values.cookie - the cookie 'template' that will be used to set all attributes of outgoing rememberMe cookies created
by this RememberMeManager.public void forgetIdentity(org.apache.shiro.subject.SubjectContext subjectContext)
protected void forgetIdentity(org.apache.shiro.subject.Subject subject)
forgetIdentity in class org.apache.shiro.mgt.AbstractRememberMeManagerprotected void rememberSerializedIdentity(org.apache.shiro.subject.Subject subject,
byte[] serialized)
subject instance is expected to be a WebSubject instance with an HTTP Request/Response pair
so an HTTP cookie can be set on the outgoing response. If it is not a WebSubject or that
WebSubject does not have an HTTP Request/Response pair, this implementation does nothing.rememberSerializedIdentity in class org.apache.shiro.mgt.AbstractRememberMeManagersubject - the Subject for which the identity is being serialized.serialized - the serialized bytes to be persisted.protected byte[] getRememberedSerializedIdentity(org.apache.shiro.subject.SubjectContext subjectContext)
null if the byte array could not be acquired.
This implementation retrieves an HTTP cookie, Base64-decodes the cookie value, and returns the resulting byte
array.
The SubjectContext instance is expected to be a WebSubjectContext instance with an HTTP
Request/Response pair so an HTTP cookie can be retrieved from the incoming request. If it is not a
WebSubjectContext or that WebSubjectContext does not have an HTTP Request/Response pair, this
implementation returns null.
getRememberedSerializedIdentity in class org.apache.shiro.mgt.AbstractRememberMeManagersubjectContext - the contextual data, usually provided by a Subject.Builder implementation, that
is being used to construct a Subject instance. To be used to assist with data
lookup.null if the byte array could not be acquired.protected java.lang.String readCookieValue(net.javapla.jawn.core.http.Context context)