public class FormAuthContext extends Object implements IFormAuthContext
| Modifier | Constructor and Description |
|---|---|
protected |
FormAuthContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response) |
| Modifier and Type | Method and Description |
|---|---|
void |
authorize()
Starts the authorization flow of the current context
|
void |
authorize(javax.servlet.FilterChain chain)
Starts the authorization flow of the current context
|
org.pac4j.core.config.Config |
buildAuthConfig() |
void |
callback()
Starts the callback handling of the current context
|
boolean |
checkAuthorisation(org.pac4j.core.profile.CommonProfile profile)
Checks the authorization of the given profiles against the current context
|
org.pac4j.core.config.Config |
getAuthConfig()
Returns the current configuration of the authentication context.
|
String |
getAuthenticatorToken()
Get the token of the current
IAuthenticator or the name of an internal authenticator |
String |
getBaseUrl()
Get the current base URL
|
Mandant |
getClient()
Get the client to which the form belongs.
|
FRQSession |
getFRQSession()
Get the current form request session to authenticate with
|
Locale |
getLocale()
Returns the locale of the auth context
|
LinkedHashMap<String,ProjectAuthenticatorConfig> |
getProjectAuthConfig()
Get the
Map of project specific authenticator configurations. |
javax.servlet.http.HttpServletRequest |
getRequest()
Returns the HTTP servlet request
|
javax.servlet.http.HttpServletResponse |
getResponse()
Returns the HTTP servlet response
|
void |
logout()
Starts the logout from the given authorizations
|
void |
logout(javax.servlet.FilterChain chain)
Starts the logout from the given authorizations
|
void |
setAuthenticatorToken(String authenticatorToken)
Set the token of the current
IAuthenticator |
void |
setFRQSession(FRQSession frqSession) |
void |
setProject(Projekt project) |
protected FormAuthContext(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
public String getAuthenticatorToken()
IFormAuthContextIAuthenticator or the name of an internal authenticatorgetAuthenticatorToken in interface IFormAuthContextString token or namepublic void setAuthenticatorToken(String authenticatorToken)
IFormAuthContextIAuthenticatorsetAuthenticatorToken in interface IFormAuthContextauthenticatorToken - The token of the current IAuthenticator or the name of an internal authenticator.public LinkedHashMap<String,ProjectAuthenticatorConfig> getProjectAuthConfig()
IFormAuthContextMap of project specific authenticator configurations.getProjectAuthConfig in interface IFormAuthContextMap that maps the name (if it is a system authenticator) or callback UUID (if it is a client
authenticator) to the corresponding ProjectAuthenticatorConfig.public Mandant getClient()
IFormAuthContextgetClient in interface IFormAuthContextMandant to which the form belongs.public String getBaseUrl()
IFormAuthContextgetBaseUrl in interface IFormAuthContextString the base URLpublic void setProject(Projekt project)
public FRQSession getFRQSession()
IFormAuthContextgetFRQSession in interface IFormAuthContextFRQSession to authenticatepublic void setFRQSession(FRQSession frqSession)
public Locale getLocale()
IFormAuthContextgetLocale in interface IFormAuthContextLocalepublic javax.servlet.http.HttpServletRequest getRequest()
IFormAuthContextgetRequest in interface IFormAuthContextHttpServletRequestpublic javax.servlet.http.HttpServletResponse getResponse()
IFormAuthContextgetResponse in interface IFormAuthContextpublic org.pac4j.core.config.Config getAuthConfig()
IFormAuthContextgetAuthConfig in interface IFormAuthContextConfig.public org.pac4j.core.config.Config buildAuthConfig()
public boolean checkAuthorisation(org.pac4j.core.profile.CommonProfile profile)
IFormAuthContextcheckAuthorisation in interface IFormAuthContextprofile - A CommonProfile to checktrue if authorized, or false otherwise.public void authorize()
IFormAuthContextauthorize in interface IFormAuthContextpublic void authorize(javax.servlet.FilterChain chain)
IFormAuthContextauthorize in interface IFormAuthContextchain - FilterChain to process after the authorizationpublic void logout()
IFormAuthContextlogout in interface IFormAuthContextpublic void logout(javax.servlet.FilterChain chain)
throws IOException,
javax.servlet.ServletException
IFormAuthContextlogout in interface IFormAuthContextchain - FilterChain to process after the logoutIOException - IO-errors while processing the chainjavax.servlet.ServletException - Servlet-errors while processing the chainpublic void callback()
IFormAuthContextcallback in interface IFormAuthContextCopyright © 2020 XIMA MEDIA GmbH. All rights reserved.