Class RequestContext

  • All Implemented Interfaces:
    Serializable

    public class RequestContext
    extends Object
    implements Serializable
    A data model class to define the Request Context element. The Request Context object should be used to hold the attributes regarding the authentication flow. These include the attributes:
    • The state parameter
    • The nonce value
    • Additional custom parameters

    The Request Context and its attributes would be used from the initiation of the authentication request until the authentication completion of the user.

    See Also:
    Serialized Form
    • Constructor Detail

      • RequestContext

        public RequestContext​(com.nimbusds.oauth2.sdk.id.State state,
                              com.nimbusds.openid.connect.sdk.Nonce nonce)
      • RequestContext

        public RequestContext()
    • Method Detail

      • getState

        public com.nimbusds.oauth2.sdk.id.State getState()
        Returns the state.
        Returns:
        State object for the request.
      • setState

        public void setState​(com.nimbusds.oauth2.sdk.id.State state)
        Sets the state.
        Parameters:
        state - The state object.
      • getNonce

        public com.nimbusds.openid.connect.sdk.Nonce getNonce()
        Returns the nonce.
        Returns:
        Nonce object for the request.
      • setNonce

        public void setNonce​(com.nimbusds.openid.connect.sdk.Nonce nonce)
        Sets the nonce.
        Parameters:
        nonce - The nonce object.
      • getParameter

        public Object getParameter​(String key)
        Returns the object for the particular key.
        Parameters:
        key - The String value of the key.
        Returns:
        The additional parameter object in the request for the particular key.
      • setParameter

        public void setParameter​(String key,
                                 Object value)
        Sets additional parameter to the Request Context.
        Parameters:
        key - The key of the parameter.
        value - The value of the parameter.