Class CCAuthenticationResponse
java.lang.Object
de.florianmichael.classic4j.model.classicube.CCAuthenticationResponse
This class represents the response of the ClassiCube server list when authenticating. It is used by
ClassiCubeHandler.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCCAuthenticationResponse(String token, String username, boolean authenticated, Set<String> errors) -
Method Summary
Modifier and TypeMethodDescriptionerrors()static CCAuthenticationResponseReturns a string containing all errors separated by a new line.booleanboolean
-
Field Details
-
token
-
username
-
authenticated
public final boolean authenticated -
errors
-
-
Constructor Details
-
CCAuthenticationResponse
-
-
Method Details
-
fromJson
- Parameters:
json- The JSON string to create theCCAuthenticationResponsefrom.- Returns:
- The created
CCAuthenticationResponse.
-
shouldError
public boolean shouldError()- Returns:
- Whether the
CCAuthenticationResponsecontains any errors.
-
getErrorDisplay
Returns a string containing all errors separated by a new line.- Returns:
- The error display.
-
errors
- Returns:
- All error names as a set.
-
mfaRequired
public boolean mfaRequired()- Returns:
- Whether the
CCError.LOGIN_CODEerror is present.
-