Interface ITokenAdapter

  • All Known Implementing Classes:
    FacebookTokenAdapter

    public interface ITokenAdapter
    Interface for token adapters.
    • Method Detail

      • 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.
      • 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.