Class AuthorizeAction
- java.lang.Object
-
- io.jans.as.server.authorize.ws.rs.AuthorizeAction
-
@RequestScoped @Named public class AuthorizeAction extends java.lang.Object
- Version:
- January 24, 2022
- Author:
- Javier Rojas Blum, Yuriy Movchan
-
-
Constructor Summary
Constructors Constructor Description AuthorizeAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkPermissionGranted()
void
checkUiLocales()
void
consentRequired()
java.lang.String
encodeParameters(java.lang.String url, java.util.Map<java.lang.String,java.lang.Object> parameters)
java.lang.String
getAcrValues()
java.lang.String
getAmrValues()
java.lang.String
getAuthReqId()
java.lang.String
getBindingMessage()
java.lang.String
getClaims()
java.lang.String
getClientId()
Returns the client identifier.java.lang.String
getCodeChallenge()
java.lang.String
getCodeChallengeMethod()
java.lang.String
getDisplay()
Returns an ASCII string value that specifies how the Authorization Server displays the authentication page to the End-User.java.lang.String
getIdTokenHint()
java.lang.String
getLoginHint()
java.lang.Integer
getMaxAge()
java.lang.String
getNonce()
Return a string value used to associate a user agent session with an ID Token, and to mitigate replay attacks.java.lang.String
getPrompt()
Returns a space delimited list of ASCII strings that can contain the values login, consent, select_account, and none.java.lang.String
getRedirectUri()
Returns the redirection URI.java.lang.String
getRequest()
Returns a JWT encoded OpenID Request Object.java.util.List<java.lang.String>
getRequestedClaims()
java.lang.String
getRequestUri()
Returns an URL that points to an OpenID Request Object.java.lang.String
getResponseMode()
Returns the mechanism to be used for returning parameters from the Authorization Endpoint.java.lang.String
getResponseType()
Returns the response type:code
for requesting an authorization code (authorization code grant) or token for requesting an access token (implicit grant).java.lang.String
getScope()
Returns the scope of the access request.java.util.List<Scope>
getScopes()
java.lang.String
getSessionId()
java.lang.String
getState()
Returns an opaque value used by the client to maintain state between the request and callback.java.lang.String
getUiLocales()
protected void
handleScriptError(java.lang.String facesMessageId)
protected void
handleSessionInvalid()
void
invalidRequest()
void
permissionDenied()
void
permissionGranted()
void
permissionGranted(io.jans.as.common.model.session.SessionId session)
void
setAcrValues(java.lang.String acrValues)
void
setAmrValues(java.lang.String amrValues)
void
setAuthReqId(java.lang.String authReqId)
void
setClaims(java.lang.String claims)
void
setClientId(java.lang.String clientId)
Sets the client identifier.void
setCodeChallenge(java.lang.String codeChallenge)
void
setCodeChallengeMethod(java.lang.String codeChallengeMethod)
void
setDisplay(java.lang.String display)
Sets an ASCII string value that specifies how the Authorization Server displays the authentication page to the End-User.void
setIdTokenHint(java.lang.String idTokenHint)
void
setLoginHint(java.lang.String loginHint)
void
setMaxAge(java.lang.Integer maxAge)
void
setNonce(java.lang.String nonce)
Sets a string value used to associate a user agent session with an ID Token, and to mitigate replay attacks.void
setPrompt(java.lang.String prompt)
Sets a space delimited list of ASCII strings that can contain the values login, consent, select_account, and none.void
setRedirectUri(java.lang.String redirectUri)
Sets the redirection URI.void
setRequest(java.lang.String request)
Sets a JWT encoded OpenID Request Object.void
setRequestUri(java.lang.String requestUri)
Sets an URL that points to an OpenID Request Object.void
setResponseMode(java.lang.String responseMode)
Sets the mechanism to be used for returning parameters from the Authorization Endpoint.void
setResponseType(java.lang.String responseType)
Sets the response type.void
setScope(java.lang.String scope)
Sets the scope of the access request.void
setSessionId(java.lang.String p_sessionId)
void
setState(java.lang.String state)
Sets the state between the request and callback.void
setUiLocales(java.lang.String uiLocales)
-
-
-
Method Detail
-
checkUiLocales
public void checkUiLocales()
-
checkPermissionGranted
public void checkPermissionGranted() throws java.io.IOException
- Throws:
java.io.IOException
-
getScopes
public java.util.List<Scope> getScopes()
-
getRequestedClaims
public java.util.List<java.lang.String> getRequestedClaims()
-
getScope
public java.lang.String getScope()
Returns the scope of the access request.- Returns:
- The scope of the access request.
-
setScope
public void setScope(java.lang.String scope)
Sets the scope of the access request.- Parameters:
scope
- The scope of the access request.
-
getResponseType
public java.lang.String getResponseType()
Returns the response type:code
for requesting an authorization code (authorization code grant) or token for requesting an access token (implicit grant).- Returns:
- The response type.
-
setResponseType
public void setResponseType(java.lang.String responseType)
Sets the response type.- Parameters:
responseType
- The response type.
-
getClientId
public java.lang.String getClientId()
Returns the client identifier.- Returns:
- The client identifier.
-
setClientId
public void setClientId(java.lang.String clientId)
Sets the client identifier.- Parameters:
clientId
- The client identifier.
-
getRedirectUri
public java.lang.String getRedirectUri()
Returns the redirection URI.- Returns:
- The redirection URI.
-
setRedirectUri
public void setRedirectUri(java.lang.String redirectUri)
Sets the redirection URI.- Parameters:
redirectUri
- The redirection URI.
-
getState
public java.lang.String getState()
Returns an opaque value used by the client to maintain state between the request and callback. The authorization server includes this value when redirecting the user-agent back to the client. The parameter should be used for preventing cross-site request forgery.- Returns:
- The state between the request and callback.
-
setState
public void setState(java.lang.String state)
Sets the state between the request and callback.- Parameters:
state
- The state between the request and callback.
-
getResponseMode
public java.lang.String getResponseMode()
Returns the mechanism to be used for returning parameters from the Authorization Endpoint.- Returns:
- The response mode.
-
setResponseMode
public void setResponseMode(java.lang.String responseMode)
Sets the mechanism to be used for returning parameters from the Authorization Endpoint.- Parameters:
responseMode
- The response mode.
-
getNonce
public java.lang.String getNonce()
Return a string value used to associate a user agent session with an ID Token, and to mitigate replay attacks.- Returns:
- The nonce value.
-
setNonce
public void setNonce(java.lang.String nonce)
Sets a string value used to associate a user agent session with an ID Token, and to mitigate replay attacks.- Parameters:
nonce
- The nonce value.
-
getDisplay
public java.lang.String getDisplay()
Returns an ASCII string value that specifies how the Authorization Server displays the authentication page to the End-User.- Returns:
- The display value.
-
setDisplay
public void setDisplay(java.lang.String display)
Sets an ASCII string value that specifies how the Authorization Server displays the authentication page to the End-User.- Parameters:
display
- The display value
-
getPrompt
public java.lang.String getPrompt()
Returns a space delimited list of ASCII strings that can contain the values login, consent, select_account, and none.- Returns:
- A list of prompt options.
-
setPrompt
public void setPrompt(java.lang.String prompt)
Sets a space delimited list of ASCII strings that can contain the values login, consent, select_account, and none.- Parameters:
prompt
- A list of prompt options.
-
getMaxAge
public java.lang.Integer getMaxAge()
-
setMaxAge
public void setMaxAge(java.lang.Integer maxAge)
-
getUiLocales
public java.lang.String getUiLocales()
-
setUiLocales
public void setUiLocales(java.lang.String uiLocales)
-
getIdTokenHint
public java.lang.String getIdTokenHint()
-
setIdTokenHint
public void setIdTokenHint(java.lang.String idTokenHint)
-
getLoginHint
public java.lang.String getLoginHint()
-
setLoginHint
public void setLoginHint(java.lang.String loginHint)
-
getAcrValues
public java.lang.String getAcrValues()
-
setAcrValues
public void setAcrValues(java.lang.String acrValues)
-
getAmrValues
public java.lang.String getAmrValues()
-
setAmrValues
public void setAmrValues(java.lang.String amrValues)
-
getRequest
public java.lang.String getRequest()
Returns a JWT encoded OpenID Request Object.- Returns:
- A JWT encoded OpenID Request Object.
-
setRequest
public void setRequest(java.lang.String request)
Sets a JWT encoded OpenID Request Object.- Parameters:
request
- A JWT encoded OpenID Request Object.
-
getRequestUri
public java.lang.String getRequestUri()
Returns an URL that points to an OpenID Request Object.- Returns:
- An URL that points to an OpenID Request Object.
-
setRequestUri
public void setRequestUri(java.lang.String requestUri)
Sets an URL that points to an OpenID Request Object.- Parameters:
requestUri
- An URL that points to an OpenID Request Object.
-
getSessionId
public java.lang.String getSessionId()
-
setSessionId
public void setSessionId(java.lang.String p_sessionId)
-
permissionGranted
public void permissionGranted()
-
permissionGranted
public void permissionGranted(io.jans.as.common.model.session.SessionId session)
-
permissionDenied
public void permissionDenied()
-
invalidRequest
public void invalidRequest()
-
consentRequired
public void consentRequired()
-
getCodeChallenge
public java.lang.String getCodeChallenge()
-
setCodeChallenge
public void setCodeChallenge(java.lang.String codeChallenge)
-
getCodeChallengeMethod
public java.lang.String getCodeChallengeMethod()
-
setCodeChallengeMethod
public void setCodeChallengeMethod(java.lang.String codeChallengeMethod)
-
getClaims
public java.lang.String getClaims()
-
setClaims
public void setClaims(java.lang.String claims)
-
getAuthReqId
public java.lang.String getAuthReqId()
-
setAuthReqId
public void setAuthReqId(java.lang.String authReqId)
-
getBindingMessage
public java.lang.String getBindingMessage()
-
encodeParameters
public java.lang.String encodeParameters(java.lang.String url, java.util.Map<java.lang.String,java.lang.Object> parameters)
-
handleSessionInvalid
protected void handleSessionInvalid()
-
handleScriptError
protected void handleScriptError(java.lang.String facesMessageId)
-
-