Interface ITokenAdapter

All Known Implementing Classes:
FacebookTokenAdapter

public interface ITokenAdapter
Interface for token adapters.
  • Method Details

    • getAccessTokenHeaderPrefix

      String getAccessTokenHeaderPrefix(IClientDescriptor clientDescriptor)
      Returns:
      The access token header prefix for the given client descriptor.
    • getAccessTokenHeader

      String getAccessTokenHeader(IClientDescriptor clientDescriptor)
      Returns:
      The access token header for the given client descriptor.
    • getAccessToken

      String getAccessToken(IAuthWebContext authWebContext)
      Returns:
      The access token
    • getRefreshToken

      String getRefreshToken(IAuthWebContext authWebContext)
      Returns:
      The refresh token
    • getIdToken

      String getIdToken(IAuthWebContext authWebContext)
      Returns:
      The id token query parameter for the given client descriptor.
    • isExpired

      boolean isExpired(org.pac4j.core.profile.UserProfile profile)
      Returns:
      Whether the access_token of the profile is expired
    • getUserProfile

      Optional<org.pac4j.core.profile.UserProfile> getUserProfile(IAuthWebContext authWebContext)
      Returns the user profile associated with this token adapter.
      Returns:
      An optional containing the user profile if it exists, otherwise empty.
    • getByProfile

      static Optional<ITokenAdapter> getByProfile(Optional<org.pac4j.core.profile.UserProfile> profile)