Class OAuth

    • Constructor Detail

      • OAuth

        public OAuth()
        OAuth constructor.
      • OAuth

        public OAuth​(jakarta.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​(jakarta.ws.rs.client.Client client,
                     OAuthFlow flow,
                     String authorizationUrl,
                     String tokenUrl,
                     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,
                     String authorizationUrl,
                     String tokenUrl,
                     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​(List<Pair> queryParams,
                                  Map<String,​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 String getAccessToken()
        getAccessToken method.
        Returns:
        String
      • setAccessToken

        public void setAccessToken​(String accessToken,
                                   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​(jakarta.ws.rs.client.Client client)