Record Class CCAuthenticationData
java.lang.Object
java.lang.Record
de.florianmichael.classic4j.model.classicube.account.CCAuthenticationData
public record CCAuthenticationData(String username, String password, String previousToken, String loginCode)
extends Record
This class represents the data needed to authenticate with the ClassiCube server list. It is used by
ClassiCubeHandler.-
Constructor Summary
ConstructorsConstructorDescriptionCCAuthenticationData(String username, String password, String previousToken) CCAuthenticationData(String username, String password, String previousToken, String loginCode) Creates an instance of aCCAuthenticationDatarecord 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.Returns the value of theloginCoderecord component.password()Returns the value of thepasswordrecord component.Returns the value of thepreviousTokenrecord component.final StringtoString()Returns a string representation of this record class.username()Returns the value of theusernamerecord component.withLoginCode(String loginCode) Creates a newCCAuthenticationDatawith the given loginCode.
-
Constructor Details
-
CCAuthenticationData
-
CCAuthenticationData
public CCAuthenticationData(String username, String password, String previousToken, String loginCode) Creates an instance of aCCAuthenticationDatarecord class.- Parameters:
username- the value for theusernamerecord componentpassword- the value for thepasswordrecord componentpreviousToken- the value for thepreviousTokenrecord componentloginCode- the value for theloginCoderecord component
-
-
Method Details
-
withLoginCode
Creates a newCCAuthenticationDatawith the given loginCode. This is used for two-factor authentication.- Parameters:
loginCode- The login code.- Returns:
- The created
CCAuthenticationData.
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
username
Returns the value of theusernamerecord component.- Returns:
- the value of the
usernamerecord component
-
password
Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-
previousToken
Returns the value of thepreviousTokenrecord component.- Returns:
- the value of the
previousTokenrecord component
-
loginCode
Returns the value of theloginCoderecord component.- Returns:
- the value of the
loginCoderecord component
-