Package com.protegrity.ap.java
Class AuthTokenResponse
java.lang.Object
com.protegrity.ap.java.AuthTokenResponse
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 Summary
ConstructorsConstructorDescriptionAuthTokenResponse(int statusCode, String jwtToken, String apiKey, String errorMessage) Constructs a new AuthTokenResponse. -
Method Summary
Modifier and TypeMethodDescriptionReturns the API key used for the authentication request.Returns the error message if authentication failed.Returns the JWT token obtained from authentication.intReturns the HTTP status code from the authentication request.
-
Constructor Details
-
AuthTokenResponse
Constructs a new AuthTokenResponse.- Parameters:
statusCode- the HTTP status code from the authentication requestjwtToken- the JWT token if authentication was successful, null otherwiseapiKey- the API key used for the requesterrorMessage- 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
Returns the JWT token obtained from authentication.- Returns:
- the JWT token, or null if authentication failed
-
getApiKey
Returns the API key used for the authentication request.- Returns:
- the API key
-
getErrorMessage
Returns the error message if authentication failed.- Returns:
- the error message, or null if authentication was successful
-