Class GrantedScopesGetResponse

  • All Implemented Interfaces:
    Serializable

    public class GrantedScopesGetResponse
    extends ApiResponse
    Response from Authlete's /client/granted_scopes/get/{clientId} API.
    Since:
    1.38, Authlete 1.1
    Author:
    Takahiko Kawasaki
    See Also:
    Serialized Form
    • Constructor Detail

      • GrantedScopesGetResponse

        public GrantedScopesGetResponse()
    • Method Detail

      • getServiceApiKey

        public long getServiceApiKey()
        Get the API key of the service.
        Returns:
        The API key of the service.
      • setServiceApiKey

        public void setServiceApiKey​(long key)
        Set the API key of the service.
        Parameters:
        key - The API key of the service.
      • getClientId

        public long getClientId()
        Get the client ID.
        Returns:
        The client ID.
      • setClientId

        public void setClientId​(long clientId)
        Set the client ID.
        Parameters:
        clientId - The client ID.
      • getSubject

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

        public void setSubject​(String subject)
        Set the subject (= unique identifier) of the user who has granted authorization to the client.
        Parameters:
        subject - The subject of the user.
      • getLatestGrantedScopes

        public String[] getLatestGrantedScopes()
        Get the scopes granted to the client application by the last authorization process by the user (who is identified by the subject).

        null means that there is no record about granted scopes. An empty array means that there exists a record about granted scopes but no scope has been granted to the client application. If the returned array holds some elements, they are the scopes granted to the client application by the last authorization process.

        Returns:
        The scopes granted to the client application by the last authorization process.
      • setLatestGrantedScopes

        public void setLatestGrantedScopes​(String[] scopes)
        Set the scopes granted to the client application by the last authorization process by the user (who is identified by the subject).
        Parameters:
        scopes - The scopes granted to the client application by the last authorization process.
      • getMergedGrantedScopes

        public String[] getMergedGrantedScopes()
        Get the scopes granted to the client application by all the past authorization processes. Note that revoked scopes are not included.
        Returns:
        The scopes granted to the client application by all the past authorization processes.
      • setMergedGrantedScopes

        public void setMergedGrantedScopes​(String[] scopes)
        Set the scopes granted to the client application by all the past authorization processes. Note that revoked scopes are not included.
        Parameters:
        scopes - The scopes granted to the client application by all the past authorization processes.
      • getModifiedAt

        public long getModifiedAt()
        Get the timestamp in milliseconds since Unix epoch at which this record was modified.
        Returns:
        The timestamp at which this record was modified.
      • setModifiedAt

        public void setModifiedAt​(long modifiedAt)
        Set the timestamp in milliseconds since Unix epoch at which this record was modified.
        Parameters:
        modifiedAt - The timestamp at which this record was modified.