Class OAuth

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  OAuth.Account
      Account model with the below properties.
      static class  OAuth.Link
      Link model with the below properties.
      static class  OAuth.OAuthToken
      OAuthToken model with the following properties.
      static class  OAuth.Organization
      Organization model with the below properties.
      static class  OAuth.UserInfo
      UserInfo model with the below properties.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String CODE
      used by public/native client applications.
      static java.lang.String DEMO_OAUTH_BASEPATH
      sandbox/demo base path.
      static java.lang.String GRANT_TYPE_JWT
      JWT grant type.
      static java.lang.String PRODUCTION_OAUTH_BASEPATH
      live/production base path.
      static java.lang.String Scope_EXTENDED
      obtain a refresh token with an extended lifetime.
      static java.lang.String Scope_IMPERSONATION
      obtain access to the user’s account when the user is not present.
      static java.lang.String Scope_SIGNATURE
      create and send envelopes, and obtain links for starting signing sessions.
      static java.lang.String STAGE_OAUTH_BASEPATH
      stage base path.
      static java.lang.String TOKEN
      used by private/trusted client application.
    • Constructor Summary

      Constructors 
      Constructor Description
      OAuth()
      OAuth constructor.
      OAuth​(OAuthFlow flow, java.lang.String authorizationUrl, java.lang.String tokenUrl, java.lang.String scopes)
      OAuth constructor.
      OAuth​(javax.ws.rs.client.Client client, OAuthFlow flow, java.lang.String authorizationUrl, java.lang.String tokenUrl, java.lang.String scopes)
      OAuth constructor.
      OAuth​(javax.ws.rs.client.Client client, org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder, org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder authenticationRequestBuilder)
      OAuth constructor.
    • Field Detail

      • Scope_SIGNATURE

        public static final java.lang.String Scope_SIGNATURE
        create and send envelopes, and obtain links for starting signing sessions.
        See Also:
        Constant Field Values
      • Scope_EXTENDED

        public static final java.lang.String Scope_EXTENDED
        obtain a refresh token with an extended lifetime.
        See Also:
        Constant Field Values
      • Scope_IMPERSONATION

        public static final java.lang.String Scope_IMPERSONATION
        obtain access to the user’s account when the user is not present.
        See Also:
        Constant Field Values
      • CODE

        public static final java.lang.String CODE
        used by public/native client applications.
        See Also:
        Constant Field Values
      • TOKEN

        public static final java.lang.String TOKEN
        used by private/trusted client application.
        See Also:
        Constant Field Values
      • PRODUCTION_OAUTH_BASEPATH

        public static final java.lang.String PRODUCTION_OAUTH_BASEPATH
        live/production base path.
        See Also:
        Constant Field Values
      • DEMO_OAUTH_BASEPATH

        public static final java.lang.String DEMO_OAUTH_BASEPATH
        sandbox/demo base path.
        See Also:
        Constant Field Values
      • STAGE_OAUTH_BASEPATH

        public static final java.lang.String STAGE_OAUTH_BASEPATH
        stage base path.
        See Also:
        Constant Field Values
      • GRANT_TYPE_JWT

        public static final java.lang.String GRANT_TYPE_JWT
        JWT grant type.
        See Also:
        Constant Field Values
    • Constructor Detail

      • OAuth

        public OAuth()
        OAuth constructor.
      • OAuth

        public OAuth​(javax.ws.rs.client.Client client,
                     org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder,
                     org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder authenticationRequestBuilder)
        OAuth constructor.
        Parameters:
        client - The client to use
        tokenRequestBuilder - The request builder
        authenticationRequestBuilder - The auth request builder
      • OAuth

        public OAuth​(javax.ws.rs.client.Client client,
                     OAuthFlow flow,
                     java.lang.String authorizationUrl,
                     java.lang.String tokenUrl,
                     java.lang.String scopes)
        OAuth constructor.
        Parameters:
        client - The client to use
        flow - The OAuth flow
        authorizationUrl - The auth url
        tokenUrl - The token URL
        scopes - The scopes to use
      • OAuth

        public OAuth​(OAuthFlow flow,
                     java.lang.String authorizationUrl,
                     java.lang.String tokenUrl,
                     java.lang.String scopes)
        OAuth constructor.
        Parameters:
        flow - The OAuth flow
        authorizationUrl - The auth url
        tokenUrl - The token URL
        scopes - The scopes to use
    • Method Detail

      • applyToParams

        public void applyToParams​(java.util.List<Pair> queryParams,
                                  java.util.Map<java.lang.String,​java.lang.String> headerParams)
        applyToParams method.
        Specified by:
        applyToParams in interface Authentication
        Parameters:
        queryParams - The query params
        headerParams - The header params
      • updateAccessToken

        public void updateAccessToken()
                               throws ApiException
        updateAccessToken method.
        Throws:
        ApiException
      • registerAccessTokenListener

        public void registerAccessTokenListener​(AccessTokenListener accessTokenListener)
        registerAccessTokenListener method.
        Parameters:
        accessTokenListener - The access token listener
      • getAccessToken

        public java.lang.String getAccessToken()
        getAccessToken method.
        Returns:
        String
      • setAccessToken

        public void setAccessToken​(java.lang.String accessToken,
                                   java.lang.Long expiresIn)
      • getTokenRequestBuilder

        public org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder getTokenRequestBuilder()
      • setTokenRequestBuilder

        public void setTokenRequestBuilder​(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder)
      • getAuthenticationRequestBuilder

        public org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder getAuthenticationRequestBuilder()
      • setAuthenticationRequestBuilder

        public void setAuthenticationRequestBuilder​(org.apache.oltu.oauth2.client.request.OAuthClientRequest.AuthenticationRequestBuilder authenticationRequestBuilder)
      • getOauthClient

        public org.apache.oltu.oauth2.client.OAuthClient getOauthClient()
      • setOauthClient

        public void setOauthClient​(org.apache.oltu.oauth2.client.OAuthClient oauthClient)
      • setOauthClient

        public void setOauthClient​(javax.ws.rs.client.Client client)