Class RetryingTokenAuthenticator

  • All Implemented Interfaces:
    okhttp3.Authenticator
    Direct Known Subclasses:
    ResourceOwnerPasswordTokenAuthenticator

    public abstract class RetryingTokenAuthenticator
    extends java.lang.Object
    implements okhttp3.Authenticator
    Authenticator that will retry authentication at the #tokenServiceUrl for maxRetries times.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface okhttp3.Authenticator

        okhttp3.Authenticator.Companion
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected org.shakespeareframework.retrofit.oauth2.Oauth2Api oauth2Api  
      • Fields inherited from interface okhttp3.Authenticator

        Companion, JAVA_NET_AUTHENTICATOR, NONE
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected RetryingTokenAuthenticator​(java.lang.String tokenServiceUrl, int maxRetries)  
    • Field Detail

      • oauth2Api

        protected final org.shakespeareframework.retrofit.oauth2.Oauth2Api oauth2Api
    • Constructor Detail

      • RetryingTokenAuthenticator

        protected RetryingTokenAuthenticator​(java.lang.String tokenServiceUrl,
                                             int maxRetries)
        Parameters:
        tokenServiceUrl - the URl of the token service.
        maxRetries - maximum number of retries.
    • Method Detail

      • authenticate

        @Nullable
        public okhttp3.Request authenticate​(@Nullable
                                            okhttp3.Route route,
                                            @Nonnull
                                            okhttp3.Response response)
        Specified by:
        authenticate in interface okhttp3.Authenticator