public class OpenConextOAuthClientImpl extends Object implements OpenConextOAuthClient
| Constructor and Description |
|---|
OpenConextOAuthClientImpl(OAuthEnvironment environment,
OAuthRepository repository) |
| Modifier and Type | Method and Description |
|---|---|
String |
getAuthorizationUrl(OAuthVersion version)
Get the authorization url
|
List<Person> |
getGroupMembers(String groupId,
String onBehalfOf)
Get the group members of the given group.
|
List<Group> |
getGroups(String userId,
String onBehalfOf)
Get Persons' Groups
|
List<Group20> |
getGroups20(String userId,
String onBehalfOf)
Get Persons' Groups
|
Person |
getPerson(String userId,
String onBehalfOf)
Get the OpenSocial Person.
|
boolean |
isAccessTokenGranted(String userId)
Is it possible to make OpenSocial requests for this user (as onBehalfOf).
|
void |
oauthCallback(OAuthVersion version,
javax.servlet.http.HttpServletRequest request)
Clients who have requested a redirect to the authorization URL will be
notified on the registered callback URL.
|
void |
redirectToAuthorizationUrl(OAuthVersion version,
javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Clients who wants to make three-legged calls, but who do not have an access
token yet for an user can redirect to the authorization URL.
|
public OpenConextOAuthClientImpl(OAuthEnvironment environment, OAuthRepository repository)
public boolean isAccessTokenGranted(String userId)
OpenConextOAuthClientisAccessTokenGranted in interface OpenConextOAuthClientuserId - the unique identifierpublic void redirectToAuthorizationUrl(OAuthVersion version, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
OpenConextOAuthClientredirectToAuthorizationUrl in interface OpenConextOAuthClientversion - the OAuth protocol version to userequest - the HTTP request for obtaining the request tokenresponse - the HTTP response for redirecting to the authorization urlpublic String getAuthorizationUrl(OAuthVersion version)
OpenConextOAuthClientgetAuthorizationUrl in interface OpenConextOAuthClientversion - the oauth versionpublic void oauthCallback(OAuthVersion version, javax.servlet.http.HttpServletRequest request)
OpenConextOAuthClientoauthCallback in interface OpenConextOAuthClientversion - the OAuth protocol version to userequest - the HTTP request for obtaining the request tokenpublic Person getPerson(String userId, String onBehalfOf)
OpenConextOAuthClientgetPerson in interface OpenConextOAuthClientuserId - the unique identifieronBehalfOf - the unique identifier of the user that is going to make the
requestPersonpublic List<Person> getGroupMembers(String groupId, String onBehalfOf)
OpenConextOAuthClientgetGroupMembers in interface OpenConextOAuthClientgroupId - String the unique identifier for the grouponBehalfOf - String the unique identifier of the user that is going to
make the requestArrayList containing Person'spublic List<Group> getGroups(String userId, String onBehalfOf)
OpenConextOAuthClientgetGroups in interface OpenConextOAuthClientuserId - the unique identifieronBehalfOf - the unique identifier of the user that is going to make the
requestList containing the Groupspublic List<Group20> getGroups20(String userId, String onBehalfOf)
OpenConextOAuthClientgetGroups20 in interface OpenConextOAuthClientuserId - the unique identifieronBehalfOf - the unique identifier of the user that is going to make the
requestList containing the GroupsCopyright © 2009-2012 SURFnet bv, The Netherlands. All Rights Reserved.