Class ClientAuthorizationUpdateRequest

  • All Implemented Interfaces:
    Serializable

    public class ClientAuthorizationUpdateRequest
    extends Object
    implements Serializable
    Request to Authlete's /client/authorization/update/{clientId} API.

    The API is used to update existing access tokens issued to a client application by a user.

    subject

    The subject (= identifier) of the end-user who has granted authorization to the client application.

    scopes

    A new set of scopes assigned to existing access tokens. Scopes that are not supported by the service and those that the client application is not allowed to request are ignored on the server side. If the scopes request parameter is not included in a request or its value is null, the scopes of the access token are not changed.

    Since:
    1.37
    Author:
    Takahiko Kawasaki
    See Also:
    Serialized Form
    • Constructor Detail

      • ClientAuthorizationUpdateRequest

        public ClientAuthorizationUpdateRequest()
        The default constructor.

        Because the subject parameter is mandatory for /api/client/authorization/update/{clientId} API, a non-null value should be set using setSubject(String) method later.

      • ClientAuthorizationUpdateRequest

        public ClientAuthorizationUpdateRequest​(String subject,
                                                String[] scopes)
        A constructor with a subject and scopes.
        Parameters:
        subject - The subject (= unique identifier) of the end-user.
        scopes - The new value of scopes that is set to existing access tokens. null means that scopes are not changed.
        Since:
        2.1
    • Method Detail

      • getSubject

        public String getSubject()
        Get the subject (= unique identifier) of the end-user who has granted authorization to the client application.
        Returns:
        The subject (= unique identifier) of the end-user.
      • setSubject

        public ClientAuthorizationUpdateRequest setSubject​(String subject)
        Set the subject (= unique identifier) of the end-user who has granted authorization to the client application.
        Parameters:
        subject - The subject (= unique identifier) of the end-user.
        Returns:
        this object.
      • getScopes

        public String[] getScopes()
        Get the new set of scopes assigned to existing access tokens.
        Returns:
        The new set of scopes.
      • setScopes

        public ClientAuthorizationUpdateRequest setScopes​(String[] scopes)
        Set a new set of scopes assigned to existing access tokens.

        If null is given, the scope set associated with existing access tokens is not changed.

        Parameters:
        scopes - A new set of scopes. null means that scopes are not changed.
        Returns:
        this object.