Record Class OAuthClient.TokenResponse
java.lang.Object
java.lang.Record
com.hypixel.hytale.server.core.auth.oauth.OAuthClient.TokenResponse
- Enclosing class:
OAuthClient
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final StringThe field for theaccessTokenrecord component.private final StringThe field for theerrorrecord component.private final intThe field for theexpiresInrecord component.private final StringThe field for theidTokenrecord component.private final StringThe field for therefreshTokenrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionTokenResponse(String accessToken, String refreshToken, String idToken, String error, int expiresIn) Creates an instance of aTokenResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessTokenrecord component.final booleanIndicates whether some other object is "equal to" this one.error()Returns the value of theerrorrecord component.intReturns the value of theexpiresInrecord component.final inthashCode()Returns a hash code value for this object.idToken()Returns the value of theidTokenrecord component.booleanReturns the value of therefreshTokenrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
accessToken
The field for theaccessTokenrecord component. -
refreshToken
The field for therefreshTokenrecord component. -
idToken
The field for theidTokenrecord component. -
error
The field for theerrorrecord component. -
expiresIn
private final int expiresInThe field for theexpiresInrecord component.
-
-
Constructor Details
-
TokenResponse
public TokenResponse(@Nullable String accessToken, @Nullable String refreshToken, @Nullable String idToken, @Nullable String error, int expiresIn) Creates an instance of aTokenResponserecord class.- Parameters:
accessToken- the value for theaccessTokenrecord componentrefreshToken- the value for therefreshTokenrecord componentidToken- the value for theidTokenrecord componenterror- the value for theerrorrecord componentexpiresIn- the value for theexpiresInrecord component
-
-
Method Details
-
isSuccess
public boolean isSuccess() -
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
accessToken
Returns the value of theaccessTokenrecord component.- Returns:
- the value of the
accessTokenrecord component
-
refreshToken
Returns the value of therefreshTokenrecord component.- Returns:
- the value of the
refreshTokenrecord component
-
idToken
Returns the value of theidTokenrecord component.- Returns:
- the value of the
idTokenrecord component
-
error
Returns the value of theerrorrecord component.- Returns:
- the value of the
errorrecord component
-
expiresIn
public int expiresIn()Returns the value of theexpiresInrecord component.- Returns:
- the value of the
expiresInrecord component
-