Class ResourceOwnerPasswordCredentialsGrantResponse

java.lang.Object
africa.absa.inception.oauth2.server.authorization.controller.Response
africa.absa.inception.oauth2.server.authorization.controller.ResourceOwnerPasswordCredentialsGrantResponse

public class ResourceOwnerPasswordCredentialsGrantResponse extends Response
The ResourceOwnerPasswordCredentialsGrantResponse class holds the information for a Resource Owner Password Credentials Grant response.
Author:
Marcus Portmann
  • Constructor Details

    • ResourceOwnerPasswordCredentialsGrantResponse

      public ResourceOwnerPasswordCredentialsGrantResponse(String accessToken, int expiresIn, String scope, String refreshToken)
      Constructs a new ResourceOwnerPasswordCredentialsGrantResponse.
      Parameters:
      accessToken - the access token
      expiresIn - the access token validity in seconds
      scope - the access token scope
      refreshToken - the refresh token
    • ResourceOwnerPasswordCredentialsGrantResponse

      public ResourceOwnerPasswordCredentialsGrantResponse(String accessToken, long expiresIn, String refreshToken)
      Constructs a new ResourceOwnerPasswordCredentialsGrantResponse.
      Parameters:
      accessToken - the access token
      expiresIn - the access token validity in seconds
      refreshToken - the refresh token
    • ResourceOwnerPasswordCredentialsGrantResponse

      public ResourceOwnerPasswordCredentialsGrantResponse(String accessToken, long expiresIn)
      Constructs a new ResourceOwnerPasswordCredentialsGrantResponse.
      Parameters:
      accessToken - the access token
      expiresIn - the lifetime in seconds of the access token
  • Method Details

    • getBody

      public String getBody()
      Returns the body for the OAuth2 response.
      Specified by:
      getBody in class Response
      Returns:
      the body for the OAuth2 response