public class FrontAuthenticateAction extends AuthenticateAction
AuthenticateAction.TOKEN_MODE
Modifier and Type | Field and Description |
---|---|
protected Collection<Pattern> |
_acceptedSiteUrlPatterns
url requires for authentication
|
_acceptedUrlPatterns, _authenticateTokenManager, _currentUserProvider, _observationManager, _populationContextHelper, _userManager, _userPopulationDAO, PARAMETERS_PARAMETER_TOKEN, REQUEST_ATTRIBUTE_AUTHENTICATED, REQUEST_ATTRIBUTE_AVAILABLE_USER_POPULATIONS_LIST, REQUEST_ATTRIBUTE_CONTEXTS, REQUEST_ATTRIBUTE_CREDENTIAL_PROVIDER_INDEX, REQUEST_ATTRIBUTE_CREDENTIAL_PROVIDER_LIST, REQUEST_ATTRIBUTE_GRANTED, REQUEST_ATTRIBUTE_INTERNAL_ALLOWED, REQUEST_ATTRIBUTE_INVALID_POPULATION, REQUEST_ATTRIBUTE_LOGIN_URL, REQUEST_ATTRIBUTE_SHOULD_DISPLAY_USER_POPULATIONS_LIST, REQUEST_ATTRIBUTE_USER_POPULATION_ID, REQUEST_PARAMETER_CREDENTIALPROVIDER_INDEX, REQUEST_PARAMETER_POPULATION_NAME, REQUEST_PARAMETER_TOKEN, SESSION_CONNECTING_CREDENTIALPROVIDER_INDEX, SESSION_CONNECTING_CREDENTIALPROVIDER_INDEX_LASTBLOCKINGKNOWN, SESSION_CONNECTING_CREDENTIALPROVIDER_MODE, SESSION_CONNECTING_USERPOPULATION_ID, SESSION_CREDENTIALPROVIDER, SESSION_CREDENTIALPROVIDER_MODE, SESSION_USERIDENTITY, SITEMAP_PARAMETER_TOKEN_MODE
manager
EMPTY_MAP
Constructor and Description |
---|
FrontAuthenticateAction() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
_acceptedUrl(Request request)
Determine if the request is one of the authentication process (except the credential providers)
|
protected List<String> |
_getContexts(Request request,
Parameters parameters)
Get the authentication context
|
protected CredentialProvider |
_getCredentialProviderFromSession(Request request)
Get the credential provider used for the current connection
|
protected Boolean |
_getCredentialProviderModeFromSession(Request request)
Get the credential provider mode used for the current connection
|
protected UserIdentity |
_getUserIdentityFromSession(Request request)
Get the user identity of the connected user from the session
|
protected boolean |
_handleLogout(Redirector redirector,
Map objectModel,
String source,
Parameters parameters)
Test if user wants to logout and handle it
|
protected void |
_setUserIdentityInSession(Request request,
UserIdentity userIdentity,
CredentialProvider credentialProvider,
boolean blockingMode)
Save user identity in request
|
protected UserIdentity |
_validateToken(String token)
Validate the given token
|
static CredentialProvider |
getCredentialProviderFromSession(Request request)
Get the credential provider used for the current connection
|
static CredentialProvider |
getCredentialProviderFromSession(Request request,
String siteName)
Get the credential provider used for the current connection
|
static Boolean |
getCredentialProviderModeFromSession(Request request)
Get the credential provider mode used for the current connection
|
static Boolean |
getCredentialProviderModeFromSession(Request request,
String siteName)
Get the credential provider mode used for the current connection
|
protected String |
getLoginURL(Request request)
Get the url for the redirector to display the login screen
|
protected String |
getLogoutURL(Request request)
Get the url for the redirector to display the logout screen
|
static UserIdentity |
getUserIdentityFromSession(Request request)
Get the user identity of the connected user from the session
|
static UserIdentity |
getUserIdentityFromSession(Request request,
String siteName)
Get the user identity of the connected user from the session
|
static void |
setUserIdentityInSession(Request request,
UserIdentity userIdentity,
CredentialProvider credentialProvider,
boolean blockingMode)
Save user identity in request
|
_doProcess, _getAvailableUserPopulationsIds, _getChosenUserPopulationId, _getCurrentCredentialProviderIndex, _getCurrentCredentialProviderIndexFromParameter, _getTokenFromRequest, _getUserIdentity, _handleAuthenticationToken, _hasCredentialProviders, _internalRequest, _isCurrentCredentialProviderInBlockingMode, _preFlightCheck, _prepareUserPopulationsAndCredentialProviders, _process, _resetConnectingStateToSession, _saveConnectingStateToSession, _validateCurrentlyConnectedUser, _validateCurrentlyConnectedUserIsInAuthorizedPopulation, act, getLoginURLParameters, initialize, skipCurrentCredentialProvider
service
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
protected Collection<Pattern> _acceptedSiteUrlPatterns
public FrontAuthenticateAction()
protected boolean _acceptedUrl(Request request)
AuthenticateAction
_acceptedUrl
in class AuthenticateAction
request
- The requestprotected void _setUserIdentityInSession(Request request, UserIdentity userIdentity, CredentialProvider credentialProvider, boolean blockingMode)
AuthenticateAction
_setUserIdentityInSession
in class AuthenticateAction
request
- The requestuserIdentity
- The useridentity to savecredentialProvider
- The credential provider used to connectblockingMode
- The mode used for the credential providerpublic static void setUserIdentityInSession(Request request, UserIdentity userIdentity, CredentialProvider credentialProvider, boolean blockingMode)
request
- The requestuserIdentity
- The useridentity to savecredentialProvider
- The credential provider used to connectblockingMode
- The mode used for the credential providerprotected UserIdentity _getUserIdentityFromSession(Request request)
AuthenticateAction
_getUserIdentityFromSession
in class AuthenticateAction
request
- The requestpublic static UserIdentity getUserIdentityFromSession(Request request)
request
- The requestpublic static UserIdentity getUserIdentityFromSession(Request request, String siteName)
request
- The requestsiteName
- The current site nameprotected CredentialProvider _getCredentialProviderFromSession(Request request)
AuthenticateAction
_getCredentialProviderFromSession
in class AuthenticateAction
request
- The requestpublic static CredentialProvider getCredentialProviderFromSession(Request request)
request
- The requestpublic static CredentialProvider getCredentialProviderFromSession(Request request, String siteName)
request
- The requestsiteName
- The current site nameprotected Boolean _getCredentialProviderModeFromSession(Request request)
AuthenticateAction
_getCredentialProviderModeFromSession
in class AuthenticateAction
request
- The requestpublic static Boolean getCredentialProviderModeFromSession(Request request)
request
- The requestpublic static Boolean getCredentialProviderModeFromSession(Request request, String siteName)
request
- The requestsiteName
- The current site nameprotected List<String> _getContexts(Request request, Parameters parameters)
AuthenticateAction
_getContexts
in class AuthenticateAction
request
- The requestparameters
- The action parametersprotected String getLoginURL(Request request)
AuthenticateAction
getLoginURL
in class AuthenticateAction
request
- The requestprotected String getLogoutURL(Request request)
AuthenticateAction
getLogoutURL
in class AuthenticateAction
request
- The requestprotected boolean _handleLogout(Redirector redirector, Map objectModel, String source, Parameters parameters) throws Exception
AuthenticateAction
_handleLogout
in class AuthenticateAction
redirector
- The cocoon redirectorobjectModel
- The cocoon object modelsource
- The sitemap sourceparameters
- The sitemap parametersException
- if an error occurredprotected UserIdentity _validateToken(String token)
AuthenticateAction
_validateToken
in class AuthenticateAction
token
- The non empty token to validate