Class CasOAuthWrapperProfileDefinition

java.lang.Object
org.pac4j.core.profile.definition.ProfileDefinition
org.pac4j.core.profile.definition.CommonProfileDefinition
org.pac4j.oauth.profile.definition.OAuthProfileDefinition
org.pac4j.oauth.profile.casoauthwrapper.CasOAuthWrapperProfileDefinition

public class CasOAuthWrapperProfileDefinition extends OAuthProfileDefinition
CasOAuthWrapperProfile profile definition.
Since:
1.9.2
Author:
Jerome Leleu
  • Field Details

    • IS_FROM_NEW_LOGIN

      public static final String IS_FROM_NEW_LOGIN
      Constant IS_FROM_NEW_LOGIN="isFromNewLogin"
      See Also:
    • AUTHENTICATION_DATE

      public static final String AUTHENTICATION_DATE
      Constant AUTHENTICATION_DATE="authenticationDate"
      See Also:
    • AUTHENTICATION_METHOD

      public static final String AUTHENTICATION_METHOD
      Constant AUTHENTICATION_METHOD="authenticationMethod"
      See Also:
    • SUCCESSFUL_AUTHENTICATION_HANDLERS

      public static final String SUCCESSFUL_AUTHENTICATION_HANDLERS
      Constant SUCCESSFUL_AUTHENTICATION_HANDLERS="successfulAuthenticationHandlers"
      See Also:
    • LONG_TERM_AUTHENTICATION_REQUEST_TOKEN_USED

      public static final String LONG_TERM_AUTHENTICATION_REQUEST_TOKEN_USED
      Constant LONG_TERM_AUTHENTICATION_REQUEST_TOKEN_USED="longTermAuthenticationRequestTokenUsed"
      See Also:
  • Constructor Details

    • CasOAuthWrapperProfileDefinition

      public CasOAuthWrapperProfileDefinition()

      Constructor for CasOAuthWrapperProfileDefinition.

  • Method Details

    • getProfileUrl

      public String getProfileUrl(com.github.scribejava.core.model.Token accessToken, OAuthConfiguration configuration)
      Retrieve the url of the profile of the authenticated user for the provider.
      Specified by:
      getProfileUrl in class OAuthProfileDefinition
      Parameters:
      accessToken - only used when constructing dynamic urls from data in the token
      configuration - the current configuration
      Returns:
      the url of the user profile given by the provider
    • extractUserProfile

      public CasOAuthWrapperProfile extractUserProfile(String body)
      Extract the user profile from the response (JSON, XML...) of the profile url.
      Specified by:
      extractUserProfile in class OAuthProfileDefinition
      Parameters:
      body - the response body
      Returns:
      the returned profile