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 voidcheckPermissionGranted()voidcheckUiLocales()voidconsentRequired()java.lang.StringencodeParameters(java.lang.String url, java.util.Map<java.lang.String,java.lang.Object> parameters)java.lang.StringgetAcrValues()java.lang.StringgetAmrValues()java.lang.StringgetAuthReqId()java.lang.StringgetBindingMessage()java.lang.StringgetClaims()java.lang.StringgetClientId()Returns the client identifier.java.lang.StringgetCodeChallenge()java.lang.StringgetCodeChallengeMethod()java.lang.StringgetDisplay()Returns an ASCII string value that specifies how the Authorization Server displays the authentication page to the End-User.java.lang.StringgetIdTokenHint()java.lang.StringgetLoginHint()java.lang.IntegergetMaxAge()java.lang.StringgetNonce()Return a string value used to associate a user agent session with an ID Token, and to mitigate replay attacks.java.lang.StringgetPrompt()Returns a space delimited list of ASCII strings that can contain the values login, consent, select_account, and none.java.lang.StringgetRedirectUri()Returns the redirection URI.java.lang.StringgetRequest()Returns a JWT encoded OpenID Request Object.java.util.List<java.lang.String>getRequestedClaims()java.lang.StringgetRequestUri()Returns an URL that points to an OpenID Request Object.java.lang.StringgetResponseMode()Returns the mechanism to be used for returning parameters from the Authorization Endpoint.java.lang.StringgetResponseType()Returns the response type:codefor requesting an authorization code (authorization code grant) or token for requesting an access token (implicit grant).java.lang.StringgetScope()Returns the scope of the access request.java.util.List<Scope>getScopes()java.lang.StringgetSessionId()java.lang.StringgetState()Returns an opaque value used by the client to maintain state between the request and callback.java.lang.StringgetUiLocales()protected voidhandleScriptError(java.lang.String facesMessageId)protected voidhandleSessionInvalid()voidinvalidRequest()voidpermissionDenied()voidpermissionGranted()voidpermissionGranted(io.jans.as.common.model.session.SessionId session)voidsetAcrValues(java.lang.String acrValues)voidsetAmrValues(java.lang.String amrValues)voidsetAuthReqId(java.lang.String authReqId)voidsetClaims(java.lang.String claims)voidsetClientId(java.lang.String clientId)Sets the client identifier.voidsetCodeChallenge(java.lang.String codeChallenge)voidsetCodeChallengeMethod(java.lang.String codeChallengeMethod)voidsetDisplay(java.lang.String display)Sets an ASCII string value that specifies how the Authorization Server displays the authentication page to the End-User.voidsetIdTokenHint(java.lang.String idTokenHint)voidsetLoginHint(java.lang.String loginHint)voidsetMaxAge(java.lang.Integer maxAge)voidsetNonce(java.lang.String nonce)Sets a string value used to associate a user agent session with an ID Token, and to mitigate replay attacks.voidsetPrompt(java.lang.String prompt)Sets a space delimited list of ASCII strings that can contain the values login, consent, select_account, and none.voidsetRedirectUri(java.lang.String redirectUri)Sets the redirection URI.voidsetRequest(java.lang.String request)Sets a JWT encoded OpenID Request Object.voidsetRequestUri(java.lang.String requestUri)Sets an URL that points to an OpenID Request Object.voidsetResponseMode(java.lang.String responseMode)Sets the mechanism to be used for returning parameters from the Authorization Endpoint.voidsetResponseType(java.lang.String responseType)Sets the response type.voidsetScope(java.lang.String scope)Sets the scope of the access request.voidsetSessionId(java.lang.String p_sessionId)voidsetState(java.lang.String state)Sets the state between the request and callback.voidsetUiLocales(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:codefor 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)
-
-