Class AuthorizeAction
- java.lang.Object
-
- io.jans.as.server.authorize.ws.rs.AuthorizeAction
-
@RequestScoped @Named public class AuthorizeAction extends 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()voidcheckPermissionGrantedInternal()voidcheckUiLocales()voidconsentRequired()StringencodeParameters(String url, Map<String,Object> parameters)StringgetAcrValues()StringgetAmrValues()StringgetAuthorizationDetails()Returns authorization details as string json.StringgetAuthReqId()List<io.jans.as.model.authzdetails.AuthzDetail>getAuthzDetails()Returns parsed authz details with ui representation (which is shown on authorize page).StringgetBindingMessage()StringgetClaims()StringgetClientDisplayName()StringgetClientId()Returns the client identifier.StringgetCodeChallenge()StringgetCodeChallengeMethod()StringgetDisplay()Returns an ASCII string value that specifies how the Authorization Server displays the authentication page to the End-User.StringgetIdTokenHint()StringgetLoginHint()IntegergetMaxAge()StringgetNonce()Return a string value used to associate a user agent session with an ID Token, and to mitigate replay attacks.StringgetPrompt()Returns a space delimited list of ASCII strings that can contain the values login, consent, select_account, and none.StringgetRedirectUri()Returns the redirection URI.StringgetRequest()Returns a JWT encoded OpenID Request Object.List<String>getRequestedClaims()StringgetRequestUri()Returns an URL that points to an OpenID Request Object.StringgetResponseMode()Returns the mechanism to be used for returning parameters from the Authorization Endpoint.StringgetResponseType()Returns the response type:codefor requesting an authorization code (authorization code grant) or token for requesting an access token (implicit grant).StringgetScope()Returns the scope of the access request.List<io.jans.as.persistence.model.Scope>getScopes()StringgetSessionId()StringgetState()Returns an opaque value used by the client to maintain state between the request and callback.StringgetUiLocales()protected voidhandleScriptError(String facesMessageId)protected voidhandleSessionInvalid()voidinvalidRequest()voidpermissionDenied()voidpermissionGranted()voidpermissionGranted(io.jans.as.common.model.session.SessionId session)voidsetAcrValues(String acrValues)voidsetAmrValues(String amrValues)voidsetAuthorizationDetails(String authorizationDetails)Sets authorization details string json.voidsetAuthReqId(String authReqId)voidsetClaims(String claims)voidsetClientId(String clientId)Sets the client identifier.voidsetCodeChallenge(String codeChallenge)voidsetCodeChallengeMethod(String codeChallengeMethod)voidsetDisplay(String display)Sets an ASCII string value that specifies how the Authorization Server displays the authentication page to the End-User.voidsetIdTokenHint(String idTokenHint)voidsetLoginHint(String loginHint)voidsetMaxAge(Integer maxAge)voidsetNonce(String nonce)Sets a string value used to associate a user agent session with an ID Token, and to mitigate replay attacks.voidsetPrompt(String prompt)Sets a space delimited list of ASCII strings that can contain the values login, consent, select_account, and none.voidsetRedirectUri(String redirectUri)Sets the redirection URI.voidsetRequest(String request)Sets a JWT encoded OpenID Request Object.voidsetRequestUri(String requestUri)Sets an URL that points to an OpenID Request Object.voidsetResponseMode(String responseMode)Sets the mechanism to be used for returning parameters from the Authorization Endpoint.voidsetResponseType(String responseType)Sets the response type.voidsetScope(String scope)Sets the scope of the access request.voidsetSessionId(String sessionId)voidsetState(String state)Sets the state between the request and callback.voidsetUiLocales(String uiLocales)booleanshouldSkipScript(List<String> acrValues)
-
-
-
Method Detail
-
checkUiLocales
public void checkUiLocales()
-
checkPermissionGranted
public void checkPermissionGranted()
-
checkPermissionGrantedInternal
public void checkPermissionGrantedInternal() throws IOException- Throws:
IOException
-
getScopes
public List<io.jans.as.persistence.model.Scope> getScopes()
-
getScope
public String getScope()
Returns the scope of the access request.- Returns:
- The scope of the access request.
-
setScope
public void setScope(String scope)
Sets the scope of the access request.- Parameters:
scope- The scope of the access request.
-
getResponseType
public 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(String responseType)
Sets the response type.- Parameters:
responseType- The response type.
-
getClientId
public String getClientId()
Returns the client identifier.- Returns:
- The client identifier.
-
setClientId
public void setClientId(String clientId)
Sets the client identifier.- Parameters:
clientId- The client identifier.
-
getRedirectUri
public String getRedirectUri()
Returns the redirection URI.- Returns:
- The redirection URI.
-
setRedirectUri
public void setRedirectUri(String redirectUri)
Sets the redirection URI.- Parameters:
redirectUri- The redirection URI.
-
getState
public 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(String state)
Sets the state between the request and callback.- Parameters:
state- The state between the request and callback.
-
getResponseMode
public String getResponseMode()
Returns the mechanism to be used for returning parameters from the Authorization Endpoint.- Returns:
- The response mode.
-
setResponseMode
public void setResponseMode(String responseMode)
Sets the mechanism to be used for returning parameters from the Authorization Endpoint.- Parameters:
responseMode- The response mode.
-
getNonce
public 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(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 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(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 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(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 Integer getMaxAge()
-
setMaxAge
public void setMaxAge(Integer maxAge)
-
getUiLocales
public String getUiLocales()
-
setUiLocales
public void setUiLocales(String uiLocales)
-
getIdTokenHint
public String getIdTokenHint()
-
setIdTokenHint
public void setIdTokenHint(String idTokenHint)
-
getLoginHint
public String getLoginHint()
-
setLoginHint
public void setLoginHint(String loginHint)
-
getAcrValues
public String getAcrValues()
-
setAcrValues
public void setAcrValues(String acrValues)
-
getAmrValues
public String getAmrValues()
-
setAmrValues
public void setAmrValues(String amrValues)
-
getRequest
public String getRequest()
Returns a JWT encoded OpenID Request Object.- Returns:
- A JWT encoded OpenID Request Object.
-
setRequest
public void setRequest(String request)
Sets a JWT encoded OpenID Request Object.- Parameters:
request- A JWT encoded OpenID Request Object.
-
getRequestUri
public 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(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 String getSessionId()
-
setSessionId
public void setSessionId(String 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 String getCodeChallenge()
-
setCodeChallenge
public void setCodeChallenge(String codeChallenge)
-
getCodeChallengeMethod
public String getCodeChallengeMethod()
-
setCodeChallengeMethod
public void setCodeChallengeMethod(String codeChallengeMethod)
-
getAuthzDetails
public List<io.jans.as.model.authzdetails.AuthzDetail> getAuthzDetails()
Returns parsed authz details with ui representation (which is shown on authorize page).- Returns:
- parsed authz details with ui representation (which is shown on authorize page).
-
getAuthorizationDetails
public String getAuthorizationDetails()
Returns authorization details as string json.- Returns:
- authorization details as string json
-
setAuthorizationDetails
public void setAuthorizationDetails(String authorizationDetails)
Sets authorization details string json.- Parameters:
authorizationDetails- authorization details string json
-
getClaims
public String getClaims()
-
setClaims
public void setClaims(String claims)
-
getClientDisplayName
public String getClientDisplayName()
-
getAuthReqId
public String getAuthReqId()
-
setAuthReqId
public void setAuthReqId(String authReqId)
-
getBindingMessage
public String getBindingMessage()
-
handleSessionInvalid
protected void handleSessionInvalid()
-
handleScriptError
protected void handleScriptError(String facesMessageId)
-
-