Class RegistrationRequest

java.lang.Object
org.forgerock.openig.fapi.dcr.request.RegistrationRequest

public final class RegistrationRequest extends Object
This class represents the payload of a Dynamic Client Registration request, as defined in RFC 7591.

For FAPI, the software_statement is always required in the registration request and has been extracted from the rest of the clientMetadata and stored in a separate field.

To create an instance use the RegistrationRequestFactory.

  • Constructor Details

    • RegistrationRequest

      public RegistrationRequest(SoftwareStatement softwareStatement, JsonValue clientMetadata)
      Constructor.
      Parameters:
      softwareStatement - the SoftwareStatement extracted from the client's registration request.
      clientMetadata - the claims extracted from original JWT
  • Method Details

    • getSoftwareStatement

      public SoftwareStatement getSoftwareStatement()
      Get the SoftwareStatement extracted from the client's registration request.
      Returns:
      the SoftwareStatement extracted from the client's registration request.
    • getScope

      public String getScope()
      Get the scope value from the clientMetadata.
      Returns:
      the scope value.
    • setScope

      public void setScope(String value)
      Set the scope value in the clientMetadata.
      Parameters:
      value - the scope value to set, this will replace any value that was previously set.
    • getRedirectUris

      public List<URI> getRedirectUris()
      Get the redirect_uris value from the clientMetadata.
      Returns:
      the redirect_uris
    • setRedirectUris

      public void setRedirectUris(List<URI> redirectUris)
      Set the redirect_uris value in the clientMetadata.
      Parameters:
      redirectUris - the redirect_uris value to set, this will replace any value that was previously set.
    • getResponseTypes

      public List<String> getResponseTypes()
      Get the response_types value from the clientMetadata.
      Returns:
      the response_types
    • setResponseTypes

      public void setResponseTypes(List<String> responseTypes)
      Set the response_types value in the clientMetadata.
      Parameters:
      responseTypes - the response_types value to set, this will replace any value that was previously set.
    • getTokenEndpointAuthMethod

      public String getTokenEndpointAuthMethod()
      Get the token_endpoint_auth_method value from the clientMetadata.
      Returns:
      the token_endpoint_auth_method
    • setTokenEndpointAuthMethod

      public void setTokenEndpointAuthMethod(String value)
      Set the token_endpoint_auth_method value in the clientMetadata.
      Parameters:
      value - the token_endpoint_auth_method value to set, this will replace any value that was previously set.
    • getMetadata

      public JsonValue getMetadata(String key)
      Generic get method allowing any metadata value to be retrieved.
      Parameters:
      key - the key of the metadata value to retrieve
      Returns:
      the JsonValue associated with the key, if no key exists then a JsonValue with a null value.
    • setMetadata

      public void setMetadata(String key, Object value)
      Generic set method allowing any metadata value to be set. The clientMetadata contents may be changed by PingGateway acting on behalf of the Authorisation Server, see clientMetadata for more information.

      If a setter exists for the key, then the value will be type checked and the setter will be called. If type checking fails then an IllegalArgumentException will be thrown.

      Passing a null value will remove the key from the clientMetadata if it exists.

      The software_statement metadata value cannot be overwritten, this value was issued by a Trusted Directory and is immutable. Attempting to set this value will result in an IllegalArgumentException being thrown.

      Parameters:
      key - the key of the metadata value to set
      value - the value to set
    • toJsonValue

      public JsonValue toJsonValue()
      Creates a JSON representation of the registration request.
      Returns:
      A JSON representation of the registration request.