Class GenericOAuth20Client

  • All Implemented Interfaces:
    org.pac4j.core.client.Client

    public class GenericOAuth20Client
    extends OAuth20Client

    This class is a generic OAuth2 client to authenticate users in a standard OAuth2 server.

    All configuration parameters can be specified setting the corresponding attribute.

    It returns a OAuth20Profile.

    Author:
    Julio Arrebola
    • Field Summary

      • Fields inherited from class org.pac4j.core.client.IndirectClient

        ATTEMPTED_AUTHENTICATION_SUFFIX, callbackUrl, callbackUrlResolver, urlResolver
      • Fields inherited from class org.pac4j.core.client.BaseClient

        logger, saveProfileInSession
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getClientAuthenticationMethod()  
      java.lang.String getScope()  
      protected void internalInit()  
      boolean isWithState()  
      void setAuthUrl​(java.lang.String authUrl)  
      void setClientAuthenticationMethod​(java.lang.String clientAuthenticationMethod)  
      void setCustomParams​(java.util.Map<java.lang.String,​java.lang.String> customParamsMap)  
      void setProfileAttrs​(java.util.Map<java.lang.String,​java.lang.String> profileAttrsMap)  
      void setProfileId​(java.lang.String profileId)  
      void setProfileNodePath​(java.lang.String profilePath)  
      void setProfileUrl​(java.lang.String profileUrl)  
      void setProfileVerb​(com.github.scribejava.core.model.Verb profileVerb)  
      void setScope​(java.lang.String scope)  
      void setTokenUrl​(java.lang.String tokenUrl)  
      void setWithState​(boolean withState)  
      • Methods inherited from class org.pac4j.core.client.IndirectClient

        afterInternalInit, computeFinalCallbackUrl, defaultLogoutActionBuilder, defaultRedirectionActionBuilder, getAjaxRequestResolver, getCallbackUrl, getCallbackUrlResolver, getCodeVerifierSessionAttributeName, getCredentials, getLogoutAction, getLogoutActionBuilder, getNonceSessionAttributeName, getRedirectionAction, getRedirectionActionBuilder, getStateSessionAttributeName, getUrlResolver, isCheckAuthenticationAttempt, newDefaultCallbackUrlResolver, setAjaxRequestResolver, setCallbackUrl, setCallbackUrlResolver, setCheckAuthenticationAttempt, setLogoutActionBuilder, setRedirectionActionBuilder, setUrlResolver
      • Methods inherited from class org.pac4j.core.client.BaseClient

        addAuthorizationGenerator, addAuthorizationGenerators, defaultAuthenticator, defaultCredentialsExtractor, defaultProfileCreator, getAuthenticator, getAuthorizationGenerators, getCredentialsExtractor, getCustomProperties, getName, getProfileCreator, getProfileFactoryWhenNotAuthenticated, getSaveProfileInSession, getUserProfile, isMultiProfile, notifySessionRenewal, renewUserProfile, retrieveCredentials, retrieveUserProfile, setAuthenticator, setAuthorizationGenerator, setAuthorizationGenerators, setAuthorizationGenerators, setCredentialsExtractor, setCustomProperties, setMultiProfile, setName, setProfileCreator, setProfileFactoryWhenNotAuthenticated, setSaveProfileInSession
      • Methods inherited from class org.pac4j.core.util.InitializableObject

        init, isInitialized
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • GenericOAuth20Client

        public GenericOAuth20Client()
    • Method Detail

      • setAuthUrl

        public void setAuthUrl​(java.lang.String authUrl)
      • setTokenUrl

        public void setTokenUrl​(java.lang.String tokenUrl)
      • setProfileUrl

        public void setProfileUrl​(java.lang.String profileUrl)
      • setProfileNodePath

        public void setProfileNodePath​(java.lang.String profilePath)
      • setProfileVerb

        public void setProfileVerb​(com.github.scribejava.core.model.Verb profileVerb)
      • setProfileAttrs

        public void setProfileAttrs​(java.util.Map<java.lang.String,​java.lang.String> profileAttrsMap)
      • setCustomParams

        public void setCustomParams​(java.util.Map<java.lang.String,​java.lang.String> customParamsMap)
      • setProfileId

        public void setProfileId​(java.lang.String profileId)
      • getScope

        public java.lang.String getScope()
      • setScope

        public void setScope​(java.lang.String scope)
      • isWithState

        public boolean isWithState()
      • setWithState

        public void setWithState​(boolean withState)
      • getClientAuthenticationMethod

        public java.lang.String getClientAuthenticationMethod()
      • setClientAuthenticationMethod

        public void setClientAuthenticationMethod​(java.lang.String clientAuthenticationMethod)