Record Class SignInMethods
java.lang.Object
java.lang.Record
com.irurueta.authserver.authorization.domain.social.SignInMethods
- Record Components:
password- whether the account has a password its owner knows.federatedIdentities- number of linked external identities.passkey- whether the account has a registered passkey.certificates- number of bound client certificates.
public record SignInMethods(boolean password, long federatedIdentities, boolean passkey, long certificates)
extends Record
The ways an account can sign in with. A use case that removes one asks for the methods without it
(
withoutFederatedIdentity(), withoutCertificate()) and refuses the removal when none is left.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final longThe field for thecertificatesrecord component.private final longThe field for thefederatedIdentitiesrecord component.private final booleanThe field for thepasskeyrecord component.private final booleanThe field for thepasswordrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionSignInMethods(boolean password, long federatedIdentities, boolean passkey, long certificates) Creates an instance of aSignInMethodsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanany()Tells whether any way to sign in is left.longReturns the value of thecertificatesrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of thefederatedIdentitiesrecord component.final inthashCode()Returns a hash code value for this object.booleanpasskey()Returns the value of thepasskeyrecord component.booleanpassword()Returns the value of thepasswordrecord component.final StringtoString()Returns a string representation of this record class.Counts the methods without one bound client certificate.Counts the methods without one linked external identity.
-
Field Details
-
password
private final boolean passwordThe field for thepasswordrecord component. -
federatedIdentities
private final long federatedIdentitiesThe field for thefederatedIdentitiesrecord component. -
passkey
private final boolean passkeyThe field for thepasskeyrecord component. -
certificates
private final long certificatesThe field for thecertificatesrecord component.
-
-
Constructor Details
-
SignInMethods
public SignInMethods(boolean password, long federatedIdentities, boolean passkey, long certificates) Creates an instance of aSignInMethodsrecord class.- Parameters:
password- the value for thepasswordrecord componentfederatedIdentities- the value for thefederatedIdentitiesrecord componentpasskey- the value for thepasskeyrecord componentcertificates- the value for thecertificatesrecord component
-
-
Method Details
-
any
public boolean any()Tells whether any way to sign in is left.- Returns:
truewhen there is a password, an identity, a passkey or a certificate.
-
withoutFederatedIdentity
Counts the methods without one linked external identity.- Returns:
- the methods once one identity is removed; the count never goes below zero.
-
withoutCertificate
Counts the methods without one bound client certificate.- Returns:
- the methods once one certificate is unbound; the count never goes below zero.
-
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 with '=='. -
password
public boolean password()Returns the value of thepasswordrecord component.- Returns:
- the value of the
passwordrecord component
-
federatedIdentities
public long federatedIdentities()Returns the value of thefederatedIdentitiesrecord component.- Returns:
- the value of the
federatedIdentitiesrecord component
-
passkey
public boolean passkey()Returns the value of thepasskeyrecord component.- Returns:
- the value of the
passkeyrecord component
-
certificates
public long certificates()Returns the value of thecertificatesrecord component.- Returns:
- the value of the
certificatesrecord component
-