Record Class AuthManager.AuthReport
java.lang.Object
java.lang.Record
pro.gravit.launchserver.manangers.AuthManager.AuthReport
- Enclosing class:
- AuthManager
public static record AuthManager.AuthReport(String minecraftAccessToken, String oauthAccessToken, String oauthRefreshToken, long oauthExpire, UserSession session)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionAuthReport(String minecraftAccessToken, String oauthAccessToken, String oauthRefreshToken, long oauthExpire, UserSession session) Creates an instance of aAuthReportrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanReturns the value of theminecraftAccessTokenrecord component.Returns the value of theoauthAccessTokenrecord component.longReturns the value of theoauthExpirerecord component.Returns the value of theoauthRefreshTokenrecord component.static AuthManager.AuthReportofMinecraftAccessToken(String minecraftAccessToken, UserSession session) static AuthManager.AuthReportofOAuth(String oauthAccessToken, String oauthRefreshToken, long oauthExpire, UserSession session) static AuthManager.AuthReportofOAuthWithMinecraft(String minecraftAccessToken, String oauthAccessToken, String oauthRefreshToken, long oauthExpire, UserSession session) session()Returns the value of thesessionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AuthReport
public AuthReport(String minecraftAccessToken, String oauthAccessToken, String oauthRefreshToken, long oauthExpire, UserSession session) Creates an instance of aAuthReportrecord class.- Parameters:
minecraftAccessToken- the value for theminecraftAccessTokenrecord componentoauthAccessToken- the value for theoauthAccessTokenrecord componentoauthRefreshToken- the value for theoauthRefreshTokenrecord componentoauthExpire- the value for theoauthExpirerecord componentsession- the value for thesessionrecord component
-
-
Method Details
-
ofOAuth
public static AuthManager.AuthReport ofOAuth(String oauthAccessToken, String oauthRefreshToken, long oauthExpire, UserSession session) -
ofOAuthWithMinecraft
public static AuthManager.AuthReport ofOAuthWithMinecraft(String minecraftAccessToken, String oauthAccessToken, String oauthRefreshToken, long oauthExpire, UserSession session) -
ofMinecraftAccessToken
public static AuthManager.AuthReport ofMinecraftAccessToken(String minecraftAccessToken, UserSession session) -
isUsingOAuth
public boolean isUsingOAuth() -
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 '=='. -
minecraftAccessToken
Returns the value of theminecraftAccessTokenrecord component.- Returns:
- the value of the
minecraftAccessTokenrecord component
-
oauthAccessToken
Returns the value of theoauthAccessTokenrecord component.- Returns:
- the value of the
oauthAccessTokenrecord component
-
oauthRefreshToken
Returns the value of theoauthRefreshTokenrecord component.- Returns:
- the value of the
oauthRefreshTokenrecord component
-
oauthExpire
public long oauthExpire()Returns the value of theoauthExpirerecord component.- Returns:
- the value of the
oauthExpirerecord component
-
session
Returns the value of thesessionrecord component.- Returns:
- the value of the
sessionrecord component
-