Record Class OahSignup
java.lang.Object
java.lang.Record
com.github.catomat0.oauthhelper.signuptoken.OahSignup
public record OahSignup(OahSignupTokenProvider provider, OahSignupTokenService service, OahSignupTokenCookieWriter cookie)
extends Record
Signup token 관련 서비스를 묶은 파사드.
public AuthController(OahSignup signup) { this.signup = signup; }
String token = signup.provider().builder(provider, providerId, email).build();
signup.service().save(provider, providerId, token);
signup.cookie().write(response, token);
-
Constructor Summary
ConstructorsConstructorDescriptionOahSignup(OahSignupTokenProvider provider, OahSignupTokenService service, OahSignupTokenCookieWriter cookie) Creates an instance of aOahSignuprecord class. -
Method Summary
Modifier and TypeMethodDescriptioncookie()Returns the value of thecookierecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.provider()Returns the value of theproviderrecord component.service()Returns the value of theservicerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
OahSignup
public OahSignup(OahSignupTokenProvider provider, OahSignupTokenService service, OahSignupTokenCookieWriter cookie) Creates an instance of aOahSignuprecord class.- Parameters:
provider- the value for theproviderrecord componentservice- the value for theservicerecord componentcookie- the value for thecookierecord component
-
-
Method Details
-
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). -
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-
service
Returns the value of theservicerecord component.- Returns:
- the value of the
servicerecord component
-
cookie
Returns the value of thecookierecord component.- Returns:
- the value of the
cookierecord component
-