Class RetryingOAuth

  • All Implemented Interfaces:
    Authentication, okhttp3.Interceptor

    public class RetryingOAuth
    extends OAuth
    implements okhttp3.Interceptor
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface okhttp3.Interceptor

        okhttp3.Interceptor.Chain, okhttp3.Interceptor.Companion
    • Field Summary

      • Fields inherited from interface okhttp3.Interceptor

        Companion
    • Constructor Summary

      Constructors 
      Constructor Description
      RetryingOAuth​(java.lang.String tokenUrl, java.lang.String clientId, OAuthFlow flow, java.lang.String clientSecret, java.util.Map<java.lang.String,​java.lang.String> parameters)  
      RetryingOAuth​(okhttp3.OkHttpClient client, org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder)  
      RetryingOAuth​(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void applyToParams​(java.util.List<Pair> queryParams, java.util.Map<java.lang.String,​java.lang.String> headerParams, java.util.Map<java.lang.String,​java.lang.String> cookieParams)
      Apply authentication settings to header and query params.
      org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder getTokenRequestBuilder()  
      okhttp3.Response intercept​(okhttp3.Interceptor.Chain chain)  
      void setFlow​(OAuthFlow flow)  
      void setTokenRequestBuilder​(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder)  
      boolean updateAccessToken​(java.lang.String requestAccessToken)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • RetryingOAuth

        public RetryingOAuth​(okhttp3.OkHttpClient client,
                             org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder)
      • RetryingOAuth

        public RetryingOAuth​(org.apache.oltu.oauth2.client.request.OAuthClientRequest.TokenRequestBuilder tokenRequestBuilder)
      • RetryingOAuth

        public RetryingOAuth​(java.lang.String tokenUrl,
                             java.lang.String clientId,
                             OAuthFlow flow,
                             java.lang.String clientSecret,
                             java.util.Map<java.lang.String,​java.lang.String> parameters)
    • Method Detail

      • setFlow

        public void setFlow​(OAuthFlow flow)
      • intercept

        public okhttp3.Response intercept​(okhttp3.Interceptor.Chain chain)
                                   throws java.io.IOException
        Specified by:
        intercept in interface okhttp3.Interceptor
        Throws:
        java.io.IOException
      • updateAccessToken

        public boolean updateAccessToken​(java.lang.String requestAccessToken)
                                  throws java.io.IOException
        Throws:
        java.io.IOException
      • getTokenRequestBuilder

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

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

        public void applyToParams​(java.util.List<Pair> queryParams,
                                  java.util.Map<java.lang.String,​java.lang.String> headerParams,
                                  java.util.Map<java.lang.String,​java.lang.String> cookieParams)
        Description copied from interface: Authentication
        Apply authentication settings to header and query params.
        Specified by:
        applyToParams in interface Authentication
        Overrides:
        applyToParams in class OAuth
        Parameters:
        queryParams - List of query parameters
        headerParams - Map of header parameters
        cookieParams - Map of cookie parameters