Package org.pac4j.oauth.client
Class GenericOAuth20Client
- java.lang.Object
-
- org.pac4j.core.util.InitializableObject
-
- org.pac4j.core.client.BaseClient
-
- org.pac4j.core.client.IndirectClient
-
- org.pac4j.oauth.client.OAuth20Client
-
- org.pac4j.oauth.client.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.oauth.client.OAuth20Client
configuration
-
-
Constructor Summary
Constructors Constructor Description GenericOAuth20Client()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addAttributeConverter(java.lang.Class<org.pac4j.core.profile.converter.AbstractAttributeConverter> converter)
Add attribute converter.java.lang.String
getClientAuthenticationMethod()
java.util.List<java.lang.Class<? extends org.pac4j.core.profile.converter.AbstractAttributeConverter>>
getConverters()
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.oauth.client.OAuth20Client
beforeInternalInit, getConfiguration, getKey, getSecret, setConfiguration, setKey, setSecret, toString
-
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
-
-
-
-
Method Detail
-
internalInit
protected void internalInit()
- Overrides:
internalInit
in classOAuth20Client
-
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)
-
getConverters
public java.util.List<java.lang.Class<? extends org.pac4j.core.profile.converter.AbstractAttributeConverter>> getConverters()
-
addAttributeConverter
public void addAttributeConverter(java.lang.Class<org.pac4j.core.profile.converter.AbstractAttributeConverter> converter)
Add attribute converter.- Parameters:
converter
- the converter
-
-