Class AuthorizationGrant

    • Constructor Detail

      • AuthorizationGrant

        protected AuthorizationGrant​(GrantType type)
        Creates a new authorisation grant.
        Parameters:
        type - The authorisation grant type. Must not be null.
    • Method Detail

      • getType

        public GrantType getType()
        Gets the authorisation grant type.
        Returns:
        The authorisation grant type.
      • toParameters

        public abstract Map<String,​List<String>> toParameters()
        Returns the request body parameters for the authorisation grant.
        Returns:
        The parameters.
      • parse

        public static AuthorizationGrant parse​(Map<String,​List<String>> params)
                                        throws ParseException
        Parses an authorisation grant from the specified request body parameters.
        Parameters:
        params - The request body parameters. Must not be null.
        Returns:
        The authorisation grant.
        Throws:
        ParseException - If parsing failed or the grant type is not supported.