|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.arsdigita.kernel.security.CredentialManager
com.arsdigita.kernel.security.CookieManager
Manages a string value stored in a cookie.
CookieLoginModule
Field Summary | |
static String |
versionId
|
Constructor Summary | |
CookieManager()
|
Method Summary | |
protected void |
deleteValue()
Deletes the cookie named getModule().getCredentialName() . |
protected int |
getCookieMaxAge()
Determines the correct max age for the cookie in seconds. |
protected String |
getValue()
Returns the value of the cookie named getModule().getCredentialName() . |
void |
initialize(CredentialLoginModule module,
javax.security.auth.Subject subject,
javax.security.auth.callback.CallbackHandler handler,
Map shared,
Map options)
Initializes this with the login context information. |
protected void |
setValue(String value)
Sets the cookie named getModule().getCredentialName() to
the given value. |
protected boolean |
shouldSetValue(String value)
Determines whether setValue() should be called. |
Methods inherited from class com.arsdigita.kernel.security.CredentialManager |
getModule |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String versionId
Constructor Detail |
public CookieManager()
Method Detail |
public void initialize(CredentialLoginModule module, javax.security.auth.Subject subject, javax.security.auth.callback.CallbackHandler handler, Map shared, Map options)
CredentialManager
CredentialLoginModule.initialize()
.
initialize
in class CredentialManager
module
- the CredentialLoginModule
associated with
this CredentialManager
.protected boolean shouldSetValue(String value) throws javax.security.auth.login.LoginException
setValue()
should be called.
shouldSetValue
in class CredentialManager
value
- the new value for the credential
true
if the credential is not set or has the
wrong value or should be renewed, false
otherwise.
javax.security.auth.login.LoginException
- if an error occurs.protected final String getValue() throws javax.security.auth.login.LoginException
getModule().getCredentialName()
.
getValue
in class CredentialManager
getModule().getCredentialName()
.
CredentialNotFoundException
- if the cookie is not in the
current request.
javax.security.auth.login.LoginException
- if an error occurs.protected final void setValue(String value) throws javax.security.auth.login.LoginException
getModule().getCredentialName()
to
the given value.
setValue
in class CredentialManager
value
- the new value for the credential
javax.security.auth.login.LoginException
- if an error occurs.protected final void deleteValue() throws javax.security.auth.login.LoginException
getModule().getCredentialName()
.
deleteValue
in class CredentialManager
javax.security.auth.login.LoginException
- if an error occurs.protected int getCookieMaxAge() throws javax.security.auth.login.LoginException
FOREVER_SECS
if the user has requested permanent
login; -1 otherwise.
javax.security.auth.login.LoginException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |