Class AuthorizeAction


  • @RequestScoped
    @Named
    public class AuthorizeAction
    extends Object
    Version:
    January 24, 2022
    Author:
    Javier Rojas Blum, Yuriy Movchan
    • Constructor Detail

      • AuthorizeAction

        public AuthorizeAction()
    • Method Detail

      • checkUiLocales

        public void checkUiLocales()
      • checkPermissionGranted

        public void checkPermissionGranted()
      • checkPermissionGrantedInternal

        public void checkPermissionGrantedInternal()
                                            throws IOException
        Throws:
        IOException
      • shouldSkipScript

        public boolean shouldSkipScript​(List<String> acrValues)
      • getScopes

        public List<io.jans.as.persistence.model.Scope> getScopes()
      • getRequestedClaims

        public List<String> getRequestedClaims()
      • 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)