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 Details

    • AuthReport

      public AuthReport(String minecraftAccessToken, String oauthAccessToken, String oauthRefreshToken, long oauthExpire, UserSession session)
      Creates an instance of a AuthReport record class.
      Parameters:
      minecraftAccessToken - the value for the minecraftAccessToken record component
      oauthAccessToken - the value for the oauthAccessToken record component
      oauthRefreshToken - the value for the oauthRefreshToken record component
      oauthExpire - the value for the oauthExpire record component
      session - the value for the session record 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

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • minecraftAccessToken

      public String minecraftAccessToken()
      Returns the value of the minecraftAccessToken record component.
      Returns:
      the value of the minecraftAccessToken record component
    • oauthAccessToken

      public String oauthAccessToken()
      Returns the value of the oauthAccessToken record component.
      Returns:
      the value of the oauthAccessToken record component
    • oauthRefreshToken

      public String oauthRefreshToken()
      Returns the value of the oauthRefreshToken record component.
      Returns:
      the value of the oauthRefreshToken record component
    • oauthExpire

      public long oauthExpire()
      Returns the value of the oauthExpire record component.
      Returns:
      the value of the oauthExpire record component
    • session

      public UserSession session()
      Returns the value of the session record component.
      Returns:
      the value of the session record component