public abstract class AbstractSessionAuthService<U extends User,S> extends Object
getUserDetailsToLoadInSession(String)
,
setSessionFromUserDetails(User, AuthenticationToken)
Constructor and Description |
---|
AbstractSessionAuthService() |
Modifier and Type | Method and Description |
---|---|
protected CharSequence |
getPassword(String normalizedUserId) |
abstract S |
getSession() |
U |
getUserDetailsToLoadInSession(String normalizedUserId)
Create exact
User type |
abstract UserService<User,?> |
getUserService()
Handle to the
UserService backing this |
Class |
getUserType()
If provided will ensure
getUserDetailsToLoadInSession(String)
will return this type. |
<S extends org.apache.wicket.Session> |
processSessionOnLogin(S existingSession)
Opportunity to process, override session on login.
|
abstract S |
setSessionFromUserDetails(U user,
AuthenticationToken authToken)
Chance to replace the Session Object itself
|
U |
signIn(Principal inputPrincipal,
ChangeGenerator<Object> changeGenerator)
Sign in a user
Since this method allows a ChangeGenerator ; it will also generate Events of TypeSuccessful Login - BasicAuthenticationToken
Unsuccessful Login - userId as String
Exception - exception object as Exception
|
abstract void |
signOut(S session) |
void |
userValidation(U user,
UpdatableAuthenticationToken authToken)
Perform any additional user validation tasks on the loaded User object and also update the
UpdatableAuthenticationToken if necessary. |
protected final CharSequence getPassword(String normalizedUserId) throws Exception
Exception
public U getUserDetailsToLoadInSession(String normalizedUserId)
User
typeAdminUser
typepublic void userValidation(U user, UpdatableAuthenticationToken authToken)
UpdatableAuthenticationToken
if necessary.user
- as UauthToken
- as typepublic <S extends org.apache.wicket.Session> S processSessionOnLogin(S existingSession)
existingSession
- as T BasicSession
public abstract S getSession()
public abstract S setSessionFromUserDetails(U user, AuthenticationToken authToken)
User
- as Filled user Object from IDM System (DB,LDAP etc), returned from {getUserDetailsToLoadInSession(String)
after
successful authenticationauthToken
- as AuthenticationToken
, indicating there was successful Authentication with any Auth related details in it.<S>
public U signIn(Principal inputPrincipal, ChangeGenerator<Object> changeGenerator) throws Exception
ChangeGenerator
; it will also generate Events of TypeBasicAuthenticationToken
Exception
inputPrincipal
- as Principal
changeGenerator
- as an Optional ChangeGenerator
User
typeException
public Class getUserType()
getUserDetailsToLoadInSession(String)
will return this type.AdminUser
type or its children.public abstract void signOut(S session)
public abstract UserService<User,?> getUserService()
UserService
backing thisCopyright © 2018. All rights reserved.