Interface OauthToken

  • All Superinterfaces:
    org.refcodes.mixin.Disposable, org.refcodes.mixin.Disposable.Disposedable, org.refcodes.mixin.DisposedAccessor, org.refcodes.mixin.ValidAccessor
    All Known Implementing Classes:

    public interface OauthToken
    extends org.refcodes.mixin.ValidAccessor, org.refcodes.mixin.Disposable.Disposedable
    An OAuth-Token contains all relevant information to access a protected resource and refresh the the access token. "If the request for an access token is valid, the authorization server needs to generate an access token (and optional refresh token) and return these to the client, typically along with some additional properties about the authorization." HTTP/1.1 200 OK Content-Type: application/json Cache-Control: no-store Pragma: no-cache { "access_token":"MTQ0NjJkZmQ5OTM2NDE1ZTZjNGZmZjI3", "token_type":"bearer", "expires_in":3600, "refresh_token":"IwOGYzYTlmM2YxOTQ5MGE3YmNmMDFkNTVk", "scope":"create" } See ""
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.refcodes.mixin.Disposable

      • Nested classes/interfaces inherited from interface org.refcodes.mixin.DisposedAccessor

        org.refcodes.mixin.DisposedAccessor.DisposedMutator, org.refcodes.mixin.DisposedAccessor.DisposedProperty
      • Nested classes/interfaces inherited from interface org.refcodes.mixin.ValidAccessor

        org.refcodes.mixin.ValidAccessor.ValidBuilder<B extends org.refcodes.mixin.ValidAccessor.ValidBuilder<B>>, org.refcodes.mixin.ValidAccessor.ValidMutator, org.refcodes.mixin.ValidAccessor.ValidProperty
    • Method Detail

      • getAccessToken

        java.lang.String getAccessToken​()
        Returns the access token. "The access token string as issued by the authorization server." See ""
        the access token.
      • getRefreshToken

        java.lang.String getRefreshToken​()
        Returns the refresh token. "The access token string as issued by the authorization server." See ""
        the refresh token.
      • getScope

        java.lang.String getScope​()
        Returns the OAuth scope. "If the scope the user granted is identical to the scope the app requested, this parameter is optional. If the granted scope is different from the requested scope, such as if the user modified the scope, then this parameter is required." See ""
        the OAuth scope.
      • getNotBeforePolicy

        java.lang.String getNotBeforePolicy​()
        Returns the not-before-policy.
        the not-before-policy.
      • getSessionState

        java.lang.String getSessionState​()
        Returns the session state.
        the session state.
      • getTokenType

        java.lang.String getTokenType​()
        Returns the token type. "The type of token this is, typically just the string bearer" See ""
        the token type.
      • getExpiresIn

        java.lang.Integer getExpiresIn​()
        Returns the time in seconds till the access token (getAccessToken()) expires. "If the access token expires, the server should reply with the duration of time the access token is granted for." See ""
        the Expires-In time in seconds
      • getRefreshExpiresIn

        java.lang.Integer getRefreshExpiresIn​()
        Returns the time in seconds till the refresh token (getRefreshToken()) expires.
        the Expires-In time in seconds
      • isValid

        boolean isValid​()
        Returns always true if no "expires in" time (getExpiresIn()) has been set!
        Specified by:
        isValid in interface org.refcodes.mixin.ValidAccessor