Interface OAuthManager

    • Method Detail

      • getOAuthDataWithSharedToken

        Response getOAuthDataWithSharedToken​(Resource encryptedTokenResource,
                                             String configId,
                                             OAuthRequest oauthRequest)
                                      throws IOException
        Use a shared token stored on encryptedTokenNode to retrieve protected data with the specified OAuthRequest
        Parameters:
        encryptedTokenResource -
        configId -
        oauthRequest -
        Returns:
        Throws:
        IOException
      • getOAuthDataWithSharedToken

        String getOAuthDataWithSharedToken​(Resource encryptedTokenResource,
                                           String configId,
                                           String url)
                                    throws IOException
        Convenience method; same as:
         
         OAuthRequest oauthRequest = new OAuthRequest(url, Verb.GET);
         getOAuthDataWithSharedToken(encryptedTokenResource, configId, oauthRequest);
         
         
        Parameters:
        encryptedTokenResource -
        configId -
        url -
        Returns:
        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

        Provider getProvider​(String configId)
        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

        String getAuthorizedId​(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)
        Parameters:
        request -
        configId - the id of the configuration
        Returns: