Class AuthTokenResponse

java.lang.Object
com.protegrity.ap.java.AuthTokenResponse

public class AuthTokenResponse extends Object
Represents the response from an authentication token request.

This class encapsulates the result of a JWT token request, including the HTTP status code, JWT token, API key, and any error messages.

Since:
1.0.0
  • Constructor Details

    • AuthTokenResponse

      public AuthTokenResponse(int statusCode, String jwtToken, String apiKey, String errorMessage)
      Constructs a new AuthTokenResponse.
      Parameters:
      statusCode - the HTTP status code from the authentication request
      jwtToken - the JWT token if authentication was successful, null otherwise
      apiKey - the API key used for the request
      errorMessage - error message if authentication failed, null otherwise
  • Method Details

    • getStatusCode

      public int getStatusCode()
      Returns the HTTP status code from the authentication request.
      Returns:
      the HTTP status code
    • getJwtToken

      public String getJwtToken()
      Returns the JWT token obtained from authentication.
      Returns:
      the JWT token, or null if authentication failed
    • getApiKey

      public String getApiKey()
      Returns the API key used for the authentication request.
      Returns:
      the API key
    • getErrorMessage

      public String getErrorMessage()
      Returns the error message if authentication failed.
      Returns:
      the error message, or null if authentication was successful