Class SyncopeEnduserSession
- java.lang.Object
-
- org.apache.wicket.Session
-
- org.apache.wicket.protocol.http.WebSession
-
- org.apache.wicket.authroles.authentication.AbstractAuthenticatedWebSession
-
- org.apache.wicket.authroles.authentication.AuthenticatedWebSession
-
- org.apache.syncope.client.enduser.SyncopeEnduserSession
-
- All Implemented Interfaces:
Serializable,BaseSession,org.apache.wicket.event.IEventSink,org.apache.wicket.feedback.IFeedbackContributor,org.apache.wicket.IMetadataContext<Serializable,org.apache.wicket.Session>,org.apache.wicket.util.io.IClusterable
public class SyncopeEnduserSession extends org.apache.wicket.authroles.authentication.AuthenticatedWebSession implements BaseSession
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSyncopeEnduserSession.Error
-
Constructor Summary
Constructors Constructor Description SyncopeEnduserSession(org.apache.wicket.request.Request request)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanauthenticate(String jwt)booleanauthenticate(String username, String password)voidcleanup()<T> Future<T>execute(Callable<T> command)static SyncopeEnduserSessionget()org.apache.syncope.client.lib.SyncopeClientgetAnonymousClient()<T> TgetAnonymousService(Class<T> serviceClass)DateOps.FormatgetDateFormat()StringgetDomain()StringgetJWT()javax.ws.rs.core.MediaTypegetMediaType()org.apache.syncope.common.lib.info.PlatformInfogetPlatformInfo()org.apache.wicket.authroles.authorization.strategies.role.RolesgetRoles()org.apache.syncope.common.lib.to.UserTOgetSelfTO()org.apache.syncope.common.lib.to.UserTOgetSelfTO(boolean reload)<T> TgetService(Class<T> serviceClass)<T> TgetService(String etag, Class<T> serviceClass)org.apache.syncope.common.lib.info.SystemInfogetSystemInfo()voidinvalidate()protected booleanisAuthenticated()protected booleanisMustChangePassword()protected Stringmessage(org.apache.syncope.common.lib.SyncopeClientException sce)voidonException(Exception e)Extract and localize (if translation available) the actual message from the given exception; then, report it viaSession.error(java.io.Serializable).<T> voidresetClient(Class<T> service)voidsetDomain(String domain)-
Methods inherited from class org.apache.wicket.authroles.authentication.AuthenticatedWebSession
isSignedIn, signIn, signIn, signOut
-
Methods inherited from class org.apache.wicket.protocol.http.WebSession
generateNewSessionId, getClientInfo, newBrowserInfoPage
-
Methods inherited from class org.apache.wicket.Session
bind, changeSessionId, clear, debug, detach, dirty, dirty, endRequest, error, exists, fatal, getApplication, getAttribute, getAttributeNames, getAuthorizationStrategy, getClassResolver, getFeedbackMessages, getId, getLocale, getMetaData, getPageFactory, getPageManager, getSessionStore, getSizeInBytes, getStyle, info, internalDetach, invalidateNow, isRtlLanguage, isRtlLocale, isSessionInvalidated, isTemporary, newPageAccessSynchronizer, nextPageId, nextSequenceValue, onEvent, onInvalidate, removeAttribute, replaceSession, setAttribute, setClientInfo, setLocale, setMetaData, setStyle, success, warn
-
-
-
-
Method Detail
-
get
public static SyncopeEnduserSession get()
-
message
protected String message(org.apache.syncope.common.lib.SyncopeClientException sce)
-
onException
public void onException(Exception e)
Extract and localize (if translation available) the actual message from the given exception; then, report it viaSession.error(java.io.Serializable).- Specified by:
onExceptionin interfaceBaseSession- Parameters:
e- raised exception- See Also:
RestClientExceptionMapper
-
getMediaType
public javax.ws.rs.core.MediaType getMediaType()
-
execute
public <T> Future<T> execute(Callable<T> command)
- Specified by:
executein interfaceBaseSession
-
setDomain
public void setDomain(String domain)
- Specified by:
setDomainin interfaceBaseSession
-
getDomain
public String getDomain()
- Specified by:
getDomainin interfaceBaseSession
-
getJWT
public String getJWT()
- Specified by:
getJWTin interfaceBaseSession
-
getRoles
public org.apache.wicket.authroles.authorization.strategies.role.Roles getRoles()
- Specified by:
getRolesin classorg.apache.wicket.authroles.authentication.AbstractAuthenticatedWebSession
-
getPlatformInfo
public org.apache.syncope.common.lib.info.PlatformInfo getPlatformInfo()
-
getSystemInfo
public org.apache.syncope.common.lib.info.SystemInfo getSystemInfo()
-
authenticate
public boolean authenticate(String username, String password)
- Specified by:
authenticatein classorg.apache.wicket.authroles.authentication.AuthenticatedWebSession
-
authenticate
public boolean authenticate(String jwt)
-
isAuthenticated
protected boolean isAuthenticated()
-
isMustChangePassword
protected boolean isMustChangePassword()
-
cleanup
public void cleanup()
-
invalidate
public void invalidate()
- Overrides:
invalidatein classorg.apache.wicket.authroles.authentication.AuthenticatedWebSession
-
getSelfTO
public org.apache.syncope.common.lib.to.UserTO getSelfTO()
-
getSelfTO
public org.apache.syncope.common.lib.to.UserTO getSelfTO(boolean reload)
-
getAnonymousClient
public org.apache.syncope.client.lib.SyncopeClient getAnonymousClient()
- Specified by:
getAnonymousClientin interfaceBaseSession
-
getAnonymousService
public <T> T getAnonymousService(Class<T> serviceClass)
- Specified by:
getAnonymousServicein interfaceBaseSession
-
getService
public <T> T getService(Class<T> serviceClass)
- Specified by:
getServicein interfaceBaseSession
-
getService
public <T> T getService(String etag, Class<T> serviceClass)
- Specified by:
getServicein interfaceBaseSession
-
resetClient
public <T> void resetClient(Class<T> service)
- Specified by:
resetClientin interfaceBaseSession
-
getDateFormat
public DateOps.Format getDateFormat()
- Specified by:
getDateFormatin interfaceBaseSession
-
-