public class SocialNetworkServiceImpl extends Object implements SocialNetworkService, OAuthCodec
| Constructor and Description |
|---|
SocialNetworkServiceImpl(org.exoplatform.services.organization.OrganizationService orgService,
CodecInitializer codecInitializer) |
| Modifier and Type | Method and Description |
|---|---|
String |
decodeString(String input) |
String |
encodeString(String input) |
org.exoplatform.services.organization.User |
findUserByOAuthProviderUsername(OAuthProviderType oauthProviderType,
String oauthProviderUsername)
Find user from Identity DB by oauth provider username
|
<T extends AccessTokenContext> |
getOAuthAccessToken(OAuthProviderType<T> oauthProviderType,
String username)
Obtain access token of given user from DB
|
<T extends AccessTokenContext> |
removeOAuthAccessToken(OAuthProviderType<T> oauthProviderType,
String username)
Remove access token of given user from DB
|
<T extends AccessTokenContext> |
updateOAuthAccessToken(OAuthProviderType<T> oauthProviderType,
String username,
T accessToken)
Save access token of given user into DB
|
<T extends AccessTokenContext> |
updateOAuthInfo(OAuthProviderType<T> oauthProviderType,
String username,
String oauthUsername,
T accessToken)
Save OAuth informations (both username and access token) into DB
|
public SocialNetworkServiceImpl(org.exoplatform.services.organization.OrganizationService orgService,
CodecInitializer codecInitializer)
throws TokenServiceInitializationException
public org.exoplatform.services.organization.User findUserByOAuthProviderUsername(OAuthProviderType oauthProviderType, String oauthProviderUsername)
SocialNetworkServicefindUserByOAuthProviderUsername in interface SocialNetworkServicepublic <T extends AccessTokenContext> void updateOAuthAccessToken(OAuthProviderType<T> oauthProviderType, String username, T accessToken)
SocialNetworkServiceupdateOAuthAccessToken in interface SocialNetworkServicepublic <T extends AccessTokenContext> T getOAuthAccessToken(OAuthProviderType<T> oauthProviderType, String username)
SocialNetworkServicegetOAuthAccessToken in interface SocialNetworkServicepublic <T extends AccessTokenContext> void removeOAuthAccessToken(OAuthProviderType<T> oauthProviderType, String username)
SocialNetworkServiceremoveOAuthAccessToken in interface SocialNetworkServicepublic <T extends AccessTokenContext> void updateOAuthInfo(OAuthProviderType<T> oauthProviderType, String username, String oauthUsername, T accessToken)
SocialNetworkServiceupdateOAuthInfo in interface SocialNetworkServicepublic String encodeString(String input)
encodeString in interface OAuthCodecpublic String decodeString(String input)
decodeString in interface OAuthCodecCopyright © 2016 JBoss by Red Hat. All Rights Reserved.