Class ResourceOwnerPasswordTokenAuthenticator

java.lang.Object
org.shakespeareframework.retrofit.oauth2.RetryingTokenAuthenticator
org.shakespeareframework.retrofit.oauth2.ResourceOwnerPasswordTokenAuthenticator
All Implemented Interfaces:
okhttp3.Authenticator

public class ResourceOwnerPasswordTokenAuthenticator extends RetryingTokenAuthenticator
RetryingTokenAuthenticator to automatically authenticate with the Oauth2Api via resource owner password flow (grant type password) and add the access token as a header.

Also note that refresh tokens are currently ignored!

  • Constructor Details

    • ResourceOwnerPasswordTokenAuthenticator

      public ResourceOwnerPasswordTokenAuthenticator(String tokenServiceUrl, String username, String password, String clientId, String clientSecret, String scope)
      Parameters:
      tokenServiceUrl - the URl of the token service.
      username - the username
      password - the password
      clientId - the client ID
      clientSecret - the client secret
      scope - the scope
  • Method Details