@Component(value="OAuthServiceConsumer") public class OAuthServiceConsumerImpl extends Object implements OAuthServiceConsumer
| Constructor and Description |
|---|
OAuthServiceConsumerImpl() |
| Modifier and Type | Method and Description |
|---|---|
org.opensocial.Client |
getClient()
Get a OpenSocial client for two-legged oauth
|
org.opensocial.Client |
getClient(org.opensocial.auth.OAuth3LeggedScheme.Token token)
Get a OpenSocial client for two-legged oauth
|
org.opensocial.providers.Provider |
getProvider(String virtualOrganization) |
org.opensocial.auth.OAuth3LeggedScheme.Token |
getToken(String personId)
Return a token for three-legged oauth
|
boolean |
isOAuthUserConsentGranted(String personId) |
void |
oauthCallBack(org.springframework.ui.ModelMap modelMap,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Callback when the OAuth provider is returning the accessToken
|
void |
provideOauthConsent(String personId,
String callback,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
String virtualOrganization)
The underlying OpenSocial implementations use Oauth in our case.
|
void |
removeOAuthUserConsentGranted(String owner) |
void |
setEnvironment(Environment environment) |
public org.opensocial.auth.OAuth3LeggedScheme.Token getToken(String personId)
OAuthServiceConsumergetToken in interface OAuthServiceConsumerpublic org.opensocial.Client getClient()
OAuthServiceConsumergetClient in interface OAuthServiceConsumerpublic org.opensocial.Client getClient(org.opensocial.auth.OAuth3LeggedScheme.Token token)
OAuthServiceConsumergetClient in interface OAuthServiceConsumertoken - the accessTokenpublic org.opensocial.providers.Provider getProvider(String virtualOrganization)
getProvider in interface OAuthServiceConsumerpublic void provideOauthConsent(String personId, String callback, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, String virtualOrganization) throws Exception
OAuthServiceConsumerprovideOauthConsent in interface OAuthServiceConsumerpersonId - the unique identifier for the personrequest - the request to perform redirecting if necessaryExceptionpublic void oauthCallBack(org.springframework.ui.ModelMap modelMap,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws Exception
OAuthServiceConsumeroauthCallBack in interface OAuthServiceConsumermodelMap - Spring modelMaprequest - httpRequestresponse - httpResponseExceptionpublic boolean isOAuthUserConsentGranted(String personId)
isOAuthUserConsentGranted in interface OAuthServiceConsumerpublic void setEnvironment(Environment environment)
environment - the environment to setpublic void removeOAuthUserConsentGranted(String owner)
removeOAuthUserConsentGranted in interface OAuthServiceConsumerCopyright © 2009-2012 SURFnet bv, The Netherlands. All Rights Reserved.