org.apache.wicket.authentication
Interface IAuthenticationStrategy

All Known Implementing Classes:
DefaultAuthenticationStrategy, NoOpAuthenticationStrategy

public interface IAuthenticationStrategy

The interface of an authentication strategy which is accessible via Application.getSecuritySettings(). Implementations determine how logon data (username and password) are persisted (e.g. Cookie), retrieved and removed.

Author:
Juergen Donnerstag

Method Summary
 java.lang.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(java.lang.String username, java.lang.String password)
          If "rememberMe" is enabled and login was successful, than store username and password in the persistence store (e.g.
 

Method Detail

load

java.lang.String[] load()
If "rememberMe" is enabled, than load login name and password from the persistence storage (e.g. Cookie) for automatic sign in. This is useful for applications which users typically have open the whole day but where the server invalidates the session after a timeout and you want to force the user to sign in again and again during the day.

Returns:
[0] = username, [1] = password, null if not found

save

void save(java.lang.String username,
          java.lang.String password)
If "rememberMe" is enabled and login was successful, than store username and password in the persistence store (e.g. Cookie).

Parameters:
username -
password -

remove

void remove()
When the user logs out (session invalidation), than remove username and password from the persistence store



Copyright © 2006-2011 Apache Software Foundation. All Rights Reserved.