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()
IFormAuthContext
IAuthenticator
or the name of an internal authenticatorgetAuthenticatorToken
in interface IFormAuthContext
String
token or namepublic void setAuthenticatorToken(String authenticatorToken)
IFormAuthContext
IAuthenticator
setAuthenticatorToken
in interface IFormAuthContext
authenticatorToken
- The token of the current IAuthenticator
or the name of an internal authenticator.public LinkedHashMap<String,ProjectAuthenticatorConfig> getProjectAuthConfig()
IFormAuthContext
Map
of project specific authenticator configurations.getProjectAuthConfig
in interface IFormAuthContext
Map
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()
IFormAuthContext
getClient
in interface IFormAuthContext
Mandant
to which the form belongs.public String getBaseUrl()
IFormAuthContext
getBaseUrl
in interface IFormAuthContext
String
the base URLpublic void setProject(Projekt project)
public FRQSession getFRQSession()
IFormAuthContext
getFRQSession
in interface IFormAuthContext
FRQSession
to authenticatepublic void setFRQSession(FRQSession frqSession)
public Locale getLocale()
IFormAuthContext
getLocale
in interface IFormAuthContext
Locale
public javax.servlet.http.HttpServletRequest getRequest()
IFormAuthContext
getRequest
in interface IFormAuthContext
HttpServletRequest
public javax.servlet.http.HttpServletResponse getResponse()
IFormAuthContext
getResponse
in interface IFormAuthContext
public org.pac4j.core.config.Config getAuthConfig()
IFormAuthContext
getAuthConfig
in interface IFormAuthContext
Config
.public org.pac4j.core.config.Config buildAuthConfig()
public boolean checkAuthorisation(org.pac4j.core.profile.CommonProfile profile)
IFormAuthContext
checkAuthorisation
in interface IFormAuthContext
profile
- A CommonProfile
to checktrue
if authorized, or false
otherwise.public void authorize()
IFormAuthContext
authorize
in interface IFormAuthContext
public void authorize(javax.servlet.FilterChain chain)
IFormAuthContext
authorize
in interface IFormAuthContext
chain
- FilterChain
to process after the authorizationpublic void logout()
IFormAuthContext
logout
in interface IFormAuthContext
public void logout(javax.servlet.FilterChain chain) throws IOException, javax.servlet.ServletException
IFormAuthContext
logout
in interface IFormAuthContext
chain
- FilterChain
to process after the logoutIOException
- IO-errors while processing the chainjavax.servlet.ServletException
- Servlet-errors while processing the chainpublic void callback()
IFormAuthContext
callback
in interface IFormAuthContext
Copyright © 2021 XIMA MEDIA GmbH. All rights reserved.