Package com.adobe.granite.auth.oauth
Interface OAuthManager
-
Method Summary
Modifier and TypeMethodDescriptiongetAuthorizedId(HttpServletRequest request, String configId) Retrieve the user id who has been authorized for the app configured; (The user id is stored in the encrypted cookie)getOAuthDataWithSharedToken(Resource encryptedTokenResource, String configId, String url) Convenience method; same as:getOAuthDataWithSharedToken(Resource encryptedTokenResource, String configId, OAuthRequest oauthRequest) Use a shared token stored on encryptedTokenNode to retrieve protected data with the specifiedOAuthRequestgetOAuthDataWithUserToken(SlingHttpServletRequest request, String configId, String url) Convenience method; same as:getOAuthDataWithUserToken(SlingHttpServletRequest request, String configId, OAuthRequest oauthRequest) Use the user's access token (stored on the cookie or user profile jcr node) to retrieve protected data with the specifiedOAuthRequestgetProvider(String configId) Retrieve the Provider implementation specific within the config with this configId
-
Method Details
-
getOAuthDataWithUserToken
Response getOAuthDataWithUserToken(SlingHttpServletRequest request, String configId, OAuthRequest oauthRequest) throws IOException Use the user's access token (stored on the cookie or user profile jcr node) to retrieve protected data with the specifiedOAuthRequest- Parameters:
request-configId-oauthRequest-- Returns:
- String text of response
- Throws:
IOException
-
getOAuthDataWithUserToken
String getOAuthDataWithUserToken(SlingHttpServletRequest request, String configId, String url) throws IOException Convenience method; same as:OAuthRequest oauthRequest = new OAuthRequest(url, Verb.GET); getOAuthDataStreamWithUserToken(request, configId, oauthRequest);- Parameters:
request-configId-url-- Returns:
- Throws:
IOException
-
getProvider
Retrieve the Provider implementation specific within the config with this configId- Parameters:
configId-- Returns:
- the Provider or null if the config providerId doesn't match any registered providers
-
getAuthorizedId
Retrieve the user id who has been authorized for the app configured; (The user id is stored in the encrypted cookie)- Parameters:
request-configId- the id of the configuration- Returns: