Contents
Record Class OAuthClient.TokenResponse
java.lang.Object
java.lang.Record
com.hypixel.hytale.server.core.auth.oauth.OAuthClient.TokenResponse
- Enclosing class:
OAuthClient
-
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.
-
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
-
hashCode
-
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 thecomparemethod from their corresponding wrapper classes. -
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
-