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 void
checkPermissionGranted()
void
checkPermissionGrantedInternal()
void
checkUiLocales()
void
consentRequired()
String
encodeParameters(String url, Map<String,Object> parameters)
String
getAcrValues()
String
getAmrValues()
String
getAuthorizationDetails()
Returns authorization details as string json.String
getAuthReqId()
List<io.jans.as.model.authzdetails.AuthzDetail>
getAuthzDetails()
Returns parsed authz details with ui representation (which is shown on authorize page).String
getBindingMessage()
String
getClaims()
String
getClientDisplayName()
String
getClientId()
Returns the client identifier.String
getCodeChallenge()
String
getCodeChallengeMethod()
String
getDisplay()
Returns an ASCII string value that specifies how the Authorization Server displays the authentication page to the End-User.String
getIdTokenHint()
String
getLoginHint()
Integer
getMaxAge()
String
getNonce()
Return a string value used to associate a user agent session with an ID Token, and to mitigate replay attacks.String
getPrompt()
Returns a space delimited list of ASCII strings that can contain the values login, consent, select_account, and none.String
getRedirectUri()
Returns the redirection URI.String
getRequest()
Returns a JWT encoded OpenID Request Object.List<String>
getRequestedClaims()
String
getRequestUri()
Returns an URL that points to an OpenID Request Object.String
getResponseMode()
Returns the mechanism to be used for returning parameters from the Authorization Endpoint.String
getResponseType()
Returns the response type:code
for requesting an authorization code (authorization code grant) or token for requesting an access token (implicit grant).String
getScope()
Returns the scope of the access request.List<io.jans.as.persistence.model.Scope>
getScopes()
String
getSessionId()
String
getState()
Returns an opaque value used by the client to maintain state between the request and callback.String
getUiLocales()
protected void
handleScriptError(String facesMessageId)
protected void
handleSessionInvalid()
void
invalidRequest()
void
permissionDenied()
void
permissionGranted()
void
permissionGranted(io.jans.as.common.model.session.SessionId session)
void
setAcrValues(String acrValues)
void
setAmrValues(String amrValues)
void
setAuthorizationDetails(String authorizationDetails)
Sets authorization details string json.void
setAuthReqId(String authReqId)
void
setClaims(String claims)
void
setClientId(String clientId)
Sets the client identifier.void
setCodeChallenge(String codeChallenge)
void
setCodeChallengeMethod(String codeChallengeMethod)
void
setDisplay(String display)
Sets an ASCII string value that specifies how the Authorization Server displays the authentication page to the End-User.void
setIdTokenHint(String idTokenHint)
void
setLoginHint(String loginHint)
void
setMaxAge(Integer maxAge)
void
setNonce(String nonce)
Sets a string value used to associate a user agent session with an ID Token, and to mitigate replay attacks.void
setPrompt(String prompt)
Sets a space delimited list of ASCII strings that can contain the values login, consent, select_account, and none.void
setRedirectUri(String redirectUri)
Sets the redirection URI.void
setRequest(String request)
Sets a JWT encoded OpenID Request Object.void
setRequestUri(String requestUri)
Sets an URL that points to an OpenID Request Object.void
setResponseMode(String responseMode)
Sets the mechanism to be used for returning parameters from the Authorization Endpoint.void
setResponseType(String responseType)
Sets the response type.void
setScope(String scope)
Sets the scope of the access request.void
setSessionId(String sessionId)
void
setState(String state)
Sets the state between the request and callback.void
setUiLocales(String uiLocales)
boolean
shouldSkipScript(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: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(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)
-
-