Class ResponseMode

  • All Implemented Interfaces:
    Serializable, Comparable<Identifier>, net.minidev.json.JSONAware

    @Immutable
    public final class ResponseMode
    extends Identifier
    Authorisation response mode.

    Related specifications:

    • OAuth 2.0 Multiple Response Type Encoding Practices 1.0.
    • OAuth 2.0 Form Post Response Mode 1.0.
    • Financial-grade API: JWT Secured Authorization Response Mode for OAuth 2.0 (JARM).
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static ResponseMode FORM_POST
      The authorisation response parameters are encoded as HTML form values that are auto-submitted in the User Agent, and thus are transmitted via the HTTP POST method to the client, with the result parameters being encoded in the body using the application/x-www-form-urlencoded format.
      static ResponseMode FORM_POST_JWT
      The authorisation response parameters are packaged in a JSON Web Token (JWT) which is transmitted via the HTTP POST method to the client.
      static ResponseMode FRAGMENT
      The authorisation response parameters are encoded in the fragment added to the redirect_uri when redirecting back to the client.
      static ResponseMode FRAGMENT_JWT
      The authorisation response parameters are packaged in a JSON Web Token (JWT) which is returned as a response fragment parameter added to the redirect_uri when redirecting back to the client.
      static ResponseMode JWT
      The authorisation response parameters are packaged in a JSON Web Token (JWT) which is returned as a response parameter using the redirect encoding (query.jwt, fragment.jwt for the requested response_type.
      static ResponseMode QUERY
      The authorisation response parameters are encoded in the query string added to the redirect_uri when redirecting back to the client.
      static ResponseMode QUERY_JWT
      The authorisation response parameters are packaged in a JSON Web Token (JWT) which is returned as a response query parameter added to the redirect_uri when redirecting back to the client.
    • Constructor Summary

      Constructors 
      Constructor Description
      ResponseMode​(String value)
      Creates a new authorisation response mode with the specified value.
    • Field Detail

      • QUERY

        public static final ResponseMode QUERY
        The authorisation response parameters are encoded in the query string added to the redirect_uri when redirecting back to the client.
      • FRAGMENT

        public static final ResponseMode FRAGMENT
        The authorisation response parameters are encoded in the fragment added to the redirect_uri when redirecting back to the client.
      • FORM_POST

        public static final ResponseMode FORM_POST
        The authorisation response parameters are encoded as HTML form values that are auto-submitted in the User Agent, and thus are transmitted via the HTTP POST method to the client, with the result parameters being encoded in the body using the application/x-www-form-urlencoded format. The action attribute of the form MUST be the client's redirection URI. The method of the form attribute MUST be POST.
      • QUERY_JWT

        public static final ResponseMode QUERY_JWT
        The authorisation response parameters are packaged in a JSON Web Token (JWT) which is returned as a response query parameter added to the redirect_uri when redirecting back to the client.
      • FRAGMENT_JWT

        public static final ResponseMode FRAGMENT_JWT
        The authorisation response parameters are packaged in a JSON Web Token (JWT) which is returned as a response fragment parameter added to the redirect_uri when redirecting back to the client.
      • FORM_POST_JWT

        public static final ResponseMode FORM_POST_JWT
        The authorisation response parameters are packaged in a JSON Web Token (JWT) which is transmitted via the HTTP POST method to the client. The action attribute of the form MUST be the client's redirection URI. The method of the form attribute MUST be POST.
      • JWT

        public static final ResponseMode JWT
        The authorisation response parameters are packaged in a JSON Web Token (JWT) which is returned as a response parameter using the redirect encoding (query.jwt, fragment.jwt for the requested response_type.
    • Constructor Detail

      • ResponseMode

        public ResponseMode​(String value)
        Creates a new authorisation response mode with the specified value.
        Parameters:
        value - The response mode value. Must not be null.
    • Method Detail

      • resolve

        public static ResponseMode resolve​(ResponseMode rm,
                                           ResponseType rt)
        Resolves the requested response mode.
        Parameters:
        rm - The explicitly requested response mode (response_mode), null if not specified.
        rt - The response type (response_type), null if not known.
        Returns:
        The resolved response mode.