|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.wicket.authentication.strategy.DefaultAuthenticationStrategy
public class DefaultAuthenticationStrategy
Wicket's default implementation of an authentication strategy. It'll concatenate username and password, encrypt it and put it into one Cookie.
| Field Summary | |
|---|---|
protected String |
cookieKey
The cookie name to store the username and password |
protected String |
encryptionKey
The key to use for encrypting/decrypting the cookie value |
protected String |
VALUE_SEPARATOR
The separator used to concatenate the username and password |
| Constructor Summary | |
|---|---|
DefaultAuthenticationStrategy(String cookieKey)
Constructor |
|
DefaultAuthenticationStrategy(String cookieKey,
String encryptionKey)
|
|
| Method Summary | |
|---|---|
protected String[] |
decode(String value)
This method will decode decrypted cookie value based on application needs |
protected CookieUtils |
getCookieUtils()
Make sure you always return a valid CookieUtils |
protected ICrypt |
getCrypt()
|
String[] |
load()
If "rememberMe" is enabled, than load login name and password from the persistence storage (e.g. |
void |
remove()
When the user logs out (session invalidation), than remove username and password from the persistence store |
void |
save(String username,
String password)
If "rememberMe" is enabled and login was successful, than store username and password in the persistence store (e.g. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final String cookieKey
protected final String encryptionKey
protected final String VALUE_SEPARATOR
| Constructor Detail |
|---|
public DefaultAuthenticationStrategy(String cookieKey)
cookieKey - The name of the cookie
public DefaultAuthenticationStrategy(String cookieKey,
String encryptionKey)
| Method Detail |
|---|
protected CookieUtils getCookieUtils()
protected ICrypt getCrypt()
public String[] load()
IAuthenticationStrategy
load in interface IAuthenticationStrategyprotected String[] decode(String value)
value - decrypted cookie value
public void save(String username,
String password)
IAuthenticationStrategy
save in interface IAuthenticationStrategypublic void remove()
IAuthenticationStrategy
remove in interface IAuthenticationStrategy
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||