Class OAuthAuthorizationRequest

  • Direct Known Subclasses:
    OIDCAuthenticationRequest

    public class OAuthAuthorizationRequest
    extends Object
    An OAuth 2.0 authorization request.

    This class is mutable and not thread-safe.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private List<com.nimbusds.openid.connect.sdk.claims.ACR> acrs
      List of requested authentication context class reference values.
      private com.nimbusds.oauth2.sdk.id.ClientID clientID
      The client identifier.
      private com.nimbusds.openid.connect.sdk.Display display
      ASCII string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User.
      private URI endpointURI
      The request endpoint.
      private Duration maxAge
      Specifies the allowable elapsed time in seconds since the last time the End-User was actively authenticated by the OP.
      private com.nimbusds.openid.connect.sdk.Nonce nonce
      The nonce.
      private com.nimbusds.openid.connect.sdk.Prompt prompt
      Space delimited, case sensitive list of ASCII string values that specifies whether the Authorization Server prompts the End-User for reauthentication and consent.
      private URI redirectURI
      The redirect URI to which the response will be sent.
      private com.nimbusds.oauth2.sdk.ResponseMode responseMode
      The response mode.
      private com.nimbusds.oauth2.sdk.ResponseType responseType
      The authorization processing flow to use.
      private com.nimbusds.oauth2.sdk.Scope scope
      The requested scopes.
      private com.nimbusds.oauth2.sdk.id.State state
      The state.
    • Constructor Summary

      Constructors 
      Constructor Description
      OAuthAuthorizationRequest​(com.nimbusds.oauth2.sdk.id.ClientID id)
      Constructor.
    • Field Detail

      • clientID

        @Nonnull
        private final com.nimbusds.oauth2.sdk.id.ClientID clientID
        The client identifier. Required.
      • state

        @Nullable
        private com.nimbusds.oauth2.sdk.id.State state
        The state.
      • redirectURI

        @Nullable
        private URI redirectURI
        The redirect URI to which the response will be sent.
      • responseType

        @Nullable
        private com.nimbusds.oauth2.sdk.ResponseType responseType
        The authorization processing flow to use.
      • endpointURI

        @Nullable
        private URI endpointURI
        The request endpoint.
      • nonce

        @Nullable
        private com.nimbusds.openid.connect.sdk.Nonce nonce
        The nonce.
      • scope

        @Nonnull
        private final com.nimbusds.oauth2.sdk.Scope scope
        The requested scopes.
      • display

        @Nullable
        private com.nimbusds.openid.connect.sdk.Display display
        ASCII string value that specifies how the Authorization Server displays the authentication and consent user interface pages to the End-User.
      • prompt

        @Nullable
        private com.nimbusds.openid.connect.sdk.Prompt prompt
        Space delimited, case sensitive list of ASCII string values that specifies whether the Authorization Server prompts the End-User for reauthentication and consent.
      • maxAge

        @Nullable
        private Duration maxAge
        Specifies the allowable elapsed time in seconds since the last time the End-User was actively authenticated by the OP.
      • acrs

        @Nonnull
        @NotLive
        private List<com.nimbusds.openid.connect.sdk.claims.ACR> acrs
        List of requested authentication context class reference values. Values appear in order of preference. Optional.
      • responseMode

        @Nullable
        private com.nimbusds.oauth2.sdk.ResponseMode responseMode
        The response mode. Optional.
    • Constructor Detail

      • OAuthAuthorizationRequest

        public OAuthAuthorizationRequest​(@Nonnull
                                         com.nimbusds.oauth2.sdk.id.ClientID id)
        Constructor.
        Parameters:
        id - the clientID. Never null.
    • Method Detail

      • getClientID

        @Nonnull
        public com.nimbusds.oauth2.sdk.id.ClientID getClientID()
        Get the client ID.
        Returns:
        the clientID.
      • getState

        @Nullable
        public com.nimbusds.oauth2.sdk.id.State getState()
        Get the state.
        Returns:
        the state.
      • setState

        public void setState​(@Nullable
                             com.nimbusds.oauth2.sdk.id.State theState)
        Set the state. Optional.
        Parameters:
        theState - The state to set.
      • getRedirectURI

        @Nullable
        public URI getRedirectURI()
        Get the redirect_uri.
        Returns:
        the redirectURI.
      • setRedirectURI

        public void setRedirectURI​(@Nonnull
                                   URI uri)
        Set the redirect_uri.
        Parameters:
        uri - The redirect_uri to set.
      • getResponseType

        @Nullable
        public com.nimbusds.oauth2.sdk.ResponseType getResponseType()
        Get the response type.
        Returns:
        the responseType.
      • setResponseType

        public void setResponseType​(@Nonnull
                                    com.nimbusds.oauth2.sdk.ResponseType type)
        Set the response type.
        Parameters:
        type - The responseType to set.
      • getEndpointURI

        @Nullable
        public URI getEndpointURI()
        Get the endpoint_uri.
        Returns:
        the endpoint_uri.
      • setEndpointURI

        public void setEndpointURI​(@Nonnull
                                   URI uri)
        Set the endpoint_uri.
        Parameters:
        uri - The endpointURI to set.
      • getNonce

        @Nullable
        public com.nimbusds.openid.connect.sdk.Nonce getNonce()
        Get the nonce.
        Returns:
        the nonce.
      • setNonce

        public void setNonce​(@Nullable
                             com.nimbusds.openid.connect.sdk.Nonce theNonce)
        Set the nonce.
        Parameters:
        theNonce - The nonce to set.
      • getScope

        @Nonnull
        public com.nimbusds.oauth2.sdk.Scope getScope()
        Get the scope.
        Returns:
        the scope.
      • getDisplay

        @Nullable
        public com.nimbusds.openid.connect.sdk.Display getDisplay()
        Get the display.
        Returns:
        the display.
      • setDisplay

        public void setDisplay​(@Nullable
                               com.nimbusds.openid.connect.sdk.Display theDisplay)
        Set the display.
        Parameters:
        theDisplay - The display to set.
      • getPrompt

        @Nullable
        public com.nimbusds.openid.connect.sdk.Prompt getPrompt()
        Get the prompt.
        Returns:
        the prompt.
      • setPrompt

        public void setPrompt​(@Nullable
                              com.nimbusds.openid.connect.sdk.Prompt thePrompt)
        Set the prompt.
        Parameters:
        thePrompt - The prompt to set.
      • getMaxAge

        @Nullable
        public Duration getMaxAge()
        Get the max age.
        Returns:
        the maxAge.
      • setMaxAge

        public void setMaxAge​(@Nullable
                              Duration max)
        Set the max age.
        Parameters:
        max - The maxAge to set.
      • getAcrs

        @Nonnull
        @NotLive
        @Unmodifiable
        public List<com.nimbusds.openid.connect.sdk.claims.ACR> getAcrs()
        Get the ACRs.
        Returns:
        the acrs.
      • setAcrs

        public void setAcrs​(@Nullable
                            List<com.nimbusds.openid.connect.sdk.claims.ACR> theAcrs)
        Set the ACRs.
        Parameters:
        theAcrs - The acrs to set.
      • getResponseMode

        @Nullable
        public com.nimbusds.oauth2.sdk.ResponseMode getResponseMode()
        Get the response mode.
        Returns:
        the responseMode.
      • setResponseMode

        public void setResponseMode​(@Nullable
                                    com.nimbusds.oauth2.sdk.ResponseMode mode)
        Set the response mode.
        Parameters:
        mode - The responseMode to set.