Class AbstractOAuth2Token

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractOAuth2Token​(java.lang.String tokenValue)
      Sub-class constructor.
      protected AbstractOAuth2Token​(java.lang.String tokenValue, java.time.Instant issuedAt, java.time.Instant expiresAt)
      Sub-class constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.time.Instant getExpiresAt()
      Returns the expiration time on or after which the token MUST NOT be accepted.
      java.time.Instant getIssuedAt()
      Returns the time at which the token was issued.
      java.lang.String getTokenValue()
      Returns the token value.
      int hashCode()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractOAuth2Token

        protected AbstractOAuth2Token​(java.lang.String tokenValue)
        Sub-class constructor.
        Parameters:
        tokenValue - the token value
      • AbstractOAuth2Token

        protected AbstractOAuth2Token​(java.lang.String tokenValue,
                                      @Nullable
                                      java.time.Instant issuedAt,
                                      @Nullable
                                      java.time.Instant expiresAt)
        Sub-class constructor.
        Parameters:
        tokenValue - the token value
        issuedAt - the time at which the token was issued, may be null
        expiresAt - the expiration time on or after which the token MUST NOT be accepted, may be null
    • Method Detail

      • getTokenValue

        public java.lang.String getTokenValue()
        Returns the token value.
        Specified by:
        getTokenValue in interface OAuth2Token
        Returns:
        the token value
      • getIssuedAt

        @Nullable
        public java.time.Instant getIssuedAt()
        Returns the time at which the token was issued.
        Specified by:
        getIssuedAt in interface OAuth2Token
        Returns:
        the time the token was issued or null
      • getExpiresAt

        @Nullable
        public java.time.Instant getExpiresAt()
        Returns the expiration time on or after which the token MUST NOT be accepted.
        Specified by:
        getExpiresAt in interface OAuth2Token
        Returns:
        the token expiration time or null
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object