Interface ITokenAdapter
- All Known Implementing Classes:
FacebookTokenAdapter
public interface ITokenAdapter
Interface for token adapters.
-
Method Summary
Modifier and TypeMethodDescriptiongetAccessToken(IAuthWebContext authWebContext) getAccessTokenHeader(IClientDescriptor clientDescriptor) getAccessTokenHeaderPrefix(IClientDescriptor clientDescriptor) static Optional<ITokenAdapter> getByProfile(Optional<org.pac4j.core.profile.UserProfile> profile) getIdToken(IAuthWebContext authWebContext) getRefreshToken(IAuthWebContext authWebContext) Optional<org.pac4j.core.profile.UserProfile> getUserProfile(IAuthWebContext authWebContext) Returns the user profile associated with this token adapter.booleanisExpired(org.pac4j.core.profile.UserProfile profile)
-
Method Details
-
getAccessTokenHeaderPrefix
- Returns:
- The access token header prefix for the given client descriptor.
-
getAccessTokenHeader
- Returns:
- The access token header for the given client descriptor.
-
getAccessToken
- Returns:
- The access token
-
getRefreshToken
- Returns:
- The refresh token
-
getIdToken
- 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
Returns the user profile associated with this token adapter.- Returns:
- An optional containing the user profile if it exists, otherwise empty.
-
getByProfile
-