Class FacebookTokenAdapter

java.lang.Object
de.xima.fc.security.token.adapter.FacebookTokenAdapter
All Implemented Interfaces:
ITokenAdapter

public class FacebookTokenAdapter extends Object
Token adapter for Facebook.
  • Field Details

  • Constructor Details

    • FacebookTokenAdapter

      protected FacebookTokenAdapter()
  • Method Details

    • renewUserProfile

      public Optional<org.pac4j.core.profile.UserProfile> renewUserProfile(IAuthWebContext authWebContext) throws org.pac4j.core.exception.TechnicalException
      Throws:
      org.pac4j.core.exception.TechnicalException
    • getAccessToken

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

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

      public boolean isExpired(org.pac4j.core.profile.UserProfile profile)
      Specified by:
      isExpired in interface ITokenAdapter
      Returns:
      Whether the access_token of the profile is expired
    • getAccessTokenHeaderPrefix

      public String getAccessTokenHeaderPrefix(IClientDescriptor clientDescriptor)
      Specified by:
      getAccessTokenHeaderPrefix in interface ITokenAdapter
      Returns:
      The access token header prefix for the given client descriptor.
    • getAccessTokenHeader

      public String getAccessTokenHeader(IClientDescriptor clientDescriptor)
      Specified by:
      getAccessTokenHeader in interface ITokenAdapter
      Returns:
      The access token header for the given client descriptor.
    • getIdToken

      public String getIdToken(IAuthWebContext authWebContext)
      Specified by:
      getIdToken in interface ITokenAdapter
      Returns:
      The id token query parameter for the given client descriptor.
    • getUserProfile

      public Optional<org.pac4j.core.profile.UserProfile> getUserProfile(IAuthWebContext authWebContext)
      Description copied from interface: ITokenAdapter
      Returns the user profile associated with this token adapter.
      Specified by:
      getUserProfile in interface ITokenAdapter
      Returns:
      An optional containing the user profile if it exists, otherwise empty.