Class AccessTokenInfo

    • Field Detail

      • NEVER_EXPIRES

        public static final long NEVER_EXPIRES
        Marker for never ending tokens.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AccessTokenInfo

        public AccessTokenInfo​(JsonValue rawInfo,
                               String token,
                               Set<String> scopes,
                               long expiresAt)
        Build an AccessTokenInfo with the provided information.
        Parameters:
        rawInfo - raw response message
        token - token identifier
        scopes - scopes of the token
        expiresAt - Token expiration time expressed as a timestamp, in milliseconds since epoch
    • Method Detail

      • getInfo

        public Map<String,​Object> getInfo()
        Returns the raw JSON as a map.
        Returns:
        the raw JSON as a map.
      • getToken

        public String getToken()
        Returns the access token identifier issued from the authorization server.
        Returns:
        the access token identifier issued from the authorization server.
      • getScopes

        public Set<String> getScopes()
        Returns the scopes associated to this token. Will return an empty Set if no scopes are associated with this token.
        Returns:
        the scopes associated to this token.
      • getExpiresAt

        public long getExpiresAt()
        Returns the time (expressed as a timestamp in milliseconds since epoch) when this token will be expired. If the NEVER_EXPIRES constant is returned, this token is always considered as available.
        Returns:
        the time (expressed as a timestamp, in milliseconds since epoch) when this token will be expired.