Package de.xima.fc.interfaces.auth
Interface IFormAuthContext
-
- All Superinterfaces:
IAuthWebContext
- All Known Implementing Classes:
FormAuthContext
public interface IFormAuthContext extends IAuthWebContext
Interface of an form based authentication context- Author:
- XIMA MEDIA GmbH
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidauthorize()Deprecated.Since 7.2.0.default voidauthorize(javax.servlet.FilterChain chain)Deprecated.Since 7.2.0.voidcallback()Starts the callback handling of the current context.default booleancheckAuthorisation(org.pac4j.core.profile.UserProfile profile)Deprecated.UsecheckAuthorization(IUser)instead.booleancheckAuthorization(IUser user)default org.pac4j.core.config.ConfiggetAuthConfig()Deprecated.Since 7.2.0.org.pac4j.core.config.ConfiggetAuthConfig(EAuthenticationFlow authFlow)Returns the current configuration of the authentication context for the given authentication flow.List<IAuthenticatorConfigWrapper>getAuthConfigOptions()StringgetAuthenticatorToken()Get the token of the currentIAuthenticatoror the name of an internal authenticatorIClientDescriptorgetAutoExecutableIndirectClient()Returns the descriptor for the indirect client that may be executed automatically.StringgetBaseUrl()Get the current base URLMandantgetClient()Get the client to which the form belongs.List<IAuthenticatorClients>getClients()Returns an ordered list of the clients for each configured authenticator.List<org.pac4j.core.client.Client>getClients(EAuthenticationFlow authFlow)Returns an ordered list of the clients for the given authentication flow.FRQSessiongetFRQSession()Get the current form request session to authenticate withLocalegetLocale()Returns the locale of the auth contextProjektgetProject()Gets the form, if any is present.Map<String,ProjectAuthenticatorConfig>getProjectAuthConfig()Deprecated.USegetAuthConfigOptions()insteadjavax.servlet.http.HttpServletRequestgetRequest()Returns the HTTP servlet requestjavax.servlet.http.HttpServletResponsegetResponse()Returns the HTTP servlet responseIAuthenticatorConfigWrappergetTokenAuthConfig()Objectlogin(EAuthenticationFlow authFlow)Starts the login logic for the given authentication flow.Objectlogin(javax.servlet.FilterChain chain, EAuthenticationFlow authFlow)Starts the login logic for the given authentication flow.voidlogout()Starts the logout from the given authorizations.voidlogout(javax.servlet.FilterChain chain)Starts the logout from the given authorizationsvoidsetAuthenticatorToken(String token)Set the token of the currentIAuthenticator-
Methods inherited from interface de.xima.fc.interfaces.auth.IAuthWebContext
getAuthenticationTarget, getProfileManager, getSessionStore, getWebContext
-
-
-
-
Method Detail
-
getAuthenticatorToken
String getAuthenticatorToken()
Get the token of the currentIAuthenticatoror the name of an internal authenticator- Returns:
Stringtoken or name
-
setAuthenticatorToken
void setAuthenticatorToken(String token)
Set the token of the currentIAuthenticator- Parameters:
token- The token of the currentIAuthenticatoror the name of an internal authenticator.
-
getTokenAuthConfig
IAuthenticatorConfigWrapper getTokenAuthConfig()
- Returns:
- the
IAuthenticatorConfigWrapperfor a given authenticator token
-
getAuthConfigOptions
List<IAuthenticatorConfigWrapper> getAuthConfigOptions()
- Returns:
- A
Listof all available authenticator configs
-
getClient
Mandant getClient()
Get the client to which the form belongs.- Returns:
- The current
Mandantto which the form belongs.
-
getProject
Projekt getProject()
Gets the form, if any is present.- Returns:
- The form, if any is present.
-
getBaseUrl
String getBaseUrl()
Get the current base URL- Specified by:
getBaseUrlin interfaceIAuthWebContext- Returns:
Stringthe base URL
-
getFRQSession
FRQSession getFRQSession()
Get the current form request session to authenticate with- Returns:
FRQSessionto authenticate
-
getAuthConfig
org.pac4j.core.config.Config getAuthConfig(EAuthenticationFlow authFlow)
Returns the current configuration of the authentication context for the given authentication flow. If no configuration is present, the configuration will be build and saved.- Parameters:
authFlow- the authentication flow for which to get the authentication configuration.- Returns:
- The existing or newly created
Config.
-
getClients
List<org.pac4j.core.client.Client> getClients(EAuthenticationFlow authFlow)
Returns an ordered list of the clients for the given authentication flow. If the clients have not been created for the given authentication flow they will be created.- Parameters:
authFlow- The authentication flow for which to get the clients.- Returns:
- An ordered list of the clients for the given authentication flow.
-
getClients
List<IAuthenticatorClients> getClients()
Returns an ordered list of the clients for each configured authenticator.- Returns:
- An ordered list of the clients for each configured authenticator.
-
getAutoExecutableIndirectClient
@Nullable IClientDescriptor getAutoExecutableIndirectClient()
Returns the descriptor for the indirect client that may be executed automatically. There may only be an auto executable indirect client iff only one authenticator is configured for the access to the form. Automatic execution of the client will result in immediate redirection to the IDP defined by the client when accessing the form.- Returns:
- the descriptor of the indirect client that may be executed automatically if it exists and
nullotherwise. - Since:
- 8.0.0
-
getRequest
javax.servlet.http.HttpServletRequest getRequest()
Returns the HTTP servlet request- Specified by:
getRequestin interfaceIAuthWebContext- Returns:
HttpServletRequest
-
getResponse
javax.servlet.http.HttpServletResponse getResponse()
Returns the HTTP servlet response- Specified by:
getResponsein interfaceIAuthWebContext- Returns:
- HttpServletResponse
-
checkAuthorization
boolean checkAuthorization(IUser user)
-
login
Object login(javax.servlet.FilterChain chain, EAuthenticationFlow authFlow)
Starts the login logic for the given authentication flow.- Parameters:
authFlow- the authentication flow for which to perform the authorization flow.chain-FilterChainto process after the authorization ornull- Returns:
- the created user profile or
null
-
login
Object login(EAuthenticationFlow authFlow)
Starts the login logic for the given authentication flow.- Parameters:
authFlow- the authentication flow for which to perform the authorization flow.- Returns:
- the created user profile or
null
-
logout
void logout()
Starts the logout from the given authorizations.
-
logout
void logout(javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletExceptionStarts the logout from the given authorizations- Parameters:
chain-FilterChainto process after the logout- Throws:
IOException- IO-errors while processing the chainjavax.servlet.ServletException- Servlet-errors while processing the chain
-
callback
void callback()
Starts the callback handling of the current context.
-
getProjectAuthConfig
@Deprecated Map<String,ProjectAuthenticatorConfig> getProjectAuthConfig()
Deprecated.USegetAuthConfigOptions()instead
-
getAuthConfig
@Deprecated default org.pac4j.core.config.Config getAuthConfig()
Deprecated.Since 7.2.0. UsegetAuthConfig(EAuthenticationFlow)instead.Returns the current configuration of the authentication context. If no configuration is present, the configuration will be build and saved.- Returns:
- The existing or newly created
Config.
-
authorize
@Deprecated default void authorize()
Deprecated.Since 7.2.0. Uselogin(FilterChain, EAuthenticationFlow)instead.Starts the authorization flow of the current context.
-
authorize
@Deprecated default void authorize(javax.servlet.FilterChain chain)
Deprecated.Since 7.2.0. Uselogin(FilterChain, EAuthenticationFlow)instead.Starts the authorization flow of the current context- Parameters:
chain-FilterChainto process after the authorization
-
checkAuthorisation
@Deprecated default boolean checkAuthorisation(org.pac4j.core.profile.UserProfile profile)
Deprecated.UsecheckAuthorization(IUser)instead.Checks the authorization of the given profiles against the current context- Parameters:
profile- ACommonProfileto check- Returns:
trueif authorized, orfalseotherwise.
-
-