Interface OAuth2SessionToken

All Known Implementing Classes:
DefaultOAuth2SessionToken

public interface OAuth2SessionToken
The holder of the claims associated with a user's session.
Author:
Nick Crum (ncrum)
  • Method Details

    • getValue

      String getValue()
      Returns:
      the serialized session token value. Typically a JWT.
    • getUserId

      String getUserId()
    • getSubject

      String getSubject()
      Returns:
      the user subject.
    • getClientId

      String getClientId()
      Returns:
      the client ID
    • getExpiresIn

      Date getExpiresIn()
      Returns:
      the expires in date
    • getMaxExpiresIn

      Date getMaxExpiresIn()
      Returns:
      the max expires in date
    • isImpersonated

      boolean isImpersonated()
      Returns:
      true if this is an impersonated session, else false.
    • getCsrClientId

      String getCsrClientId()
      Returns:
      The CSR client ID if this is an impersonated session, or null.
      See Also:
    • getCsrSubject

      String getCsrSubject()
      Returns:
      the CSR subject if this is an impersonated session, or null.
    • getCsrUserId

      String getCsrUserId()
      Returns:
      the CSR user ID if this is an impersonated session, or null.
    • isImpersonatingSelf

      boolean isImpersonatingSelf()
      See Also:
    • isCsrAnonymous

      boolean isCsrAnonymous()
      Returns:
      true if this is an anonymous impersonated session, else false.
    • getCsrInheritedAuthorities

      Collection<? extends org.springframework.security.core.GrantedAuthority> getCsrInheritedAuthorities()
      Returns:
      The inherited authorities from a CSR if this is an impersonated session, or null.
    • getClaims

      Map<String,Object> getClaims()
      Returns:
      Claims associated with this session token.