Package org.pac4j.oauth.profile.qq
Class QQProfileCreator
java.lang.Object
org.pac4j.oauth.profile.creator.OAuth20ProfileCreator
org.pac4j.oauth.profile.qq.QQProfileCreator
- All Implemented Interfaces:
org.pac4j.core.profile.creator.ProfileCreator
Specific profile creator for Tencent QQ.
- Since:
- 3.1.0
- Author:
- zhangzhenli
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.pac4j.core.client.IndirectClientprotected OAuthConfigurationprotected final org.slf4j.Loggerprotected static final com.fasterxml.jackson.databind.ObjectMapperConstantmapper -
Constructor Summary
ConstructorsConstructorDescriptionQQProfileCreator(OAuth20Configuration configuration, org.pac4j.core.client.IndirectClient client) Constructor for QQProfileCreator. -
Method Summary
Modifier and TypeMethodDescriptionOptional<org.pac4j.core.profile.UserProfile>create(org.pac4j.core.context.CallContext ctx, org.pac4j.core.credentials.Credentials credentials) protected com.github.scribejava.core.model.OAuthRequestcreateOAuthRequest(String url, com.github.scribejava.core.model.Verb verb) Create an OAuth request.Optional<org.pac4j.core.profile.UserProfile>retrieveUserProfileFromToken(org.pac4j.core.context.WebContext context, com.github.scribejava.core.model.Token accessToken) Retrieve the user profile from the access token.protected StringsendRequestForData(com.github.scribejava.core.oauth.OAuthService service, com.github.scribejava.core.model.Token accessToken, String dataUrl, com.github.scribejava.core.model.Verb verb) Make a request to get the data of the authenticated user for the provider.Methods inherited from class org.pac4j.oauth.profile.creator.OAuth20ProfileCreator
addTokenToProfile, getAccessToken, signRequest
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
mapper
protected static final com.fasterxml.jackson.databind.ObjectMapper mapperConstantmapper -
configuration
-
client
protected org.pac4j.core.client.IndirectClient client
-
-
Constructor Details
-
QQProfileCreator
public QQProfileCreator(OAuth20Configuration configuration, org.pac4j.core.client.IndirectClient client) Constructor for QQProfileCreator.
- Parameters:
configuration- aOAuth20Configurationobjectclient- aIndirectClientobject
-
-
Method Details
-
retrieveUserProfileFromToken
public Optional<org.pac4j.core.profile.UserProfile> retrieveUserProfileFromToken(org.pac4j.core.context.WebContext context, com.github.scribejava.core.model.Token accessToken) Retrieve the user profile from the access token.- Parameters:
context- the web contextaccessToken- the access token- Returns:
- the user profile
-
create
public Optional<org.pac4j.core.profile.UserProfile> create(org.pac4j.core.context.CallContext ctx, org.pac4j.core.credentials.Credentials credentials) - Specified by:
createin interfaceorg.pac4j.core.profile.creator.ProfileCreator
-
sendRequestForData
protected String sendRequestForData(com.github.scribejava.core.oauth.OAuthService service, com.github.scribejava.core.model.Token accessToken, String dataUrl, com.github.scribejava.core.model.Verb verb) Make a request to get the data of the authenticated user for the provider.- Parameters:
service- the OAuth serviceaccessToken- the access tokendataUrl- url of the dataverb- method used to request data- Returns:
- the user data response
-
createOAuthRequest
protected com.github.scribejava.core.model.OAuthRequest createOAuthRequest(String url, com.github.scribejava.core.model.Verb verb) Create an OAuth request.- Parameters:
url- the url to callverb- method used to create the request- Returns:
- the request
-