Record Class ProviderTrust
java.lang.Object
java.lang.Record
com.irurueta.authserver.authorization.domain.social.ProviderTrust
- Record Components:
provider- provider the setting belongs to.trustMfa- whether the provider's multi-factor claim is trusted.
How far a provider's own multi-factor authentication is trusted. By default a federated sign-in is a primary factor
and the normal second-factor flow applies; only a provider marked as trusted, whose upstream
amr claim
proves mfa, is accepted as a strong sign-in on its own.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringTheamrvalue (RFC 8176) that says the provider authenticated the user with several factors.private final IdentityProviderThe field for theproviderrecord component.private final booleanThe field for thetrustMfarecord component. -
Constructor Summary
ConstructorsConstructorDescriptionProviderTrust(IdentityProvider provider, boolean trustMfa) Validates the trust setting. -
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.booleanisStrong(Collection<String> upstreamAmr) Tells whether a sign-in counts as strong, that is, whether it proves identity without a second factor.provider()Returns the value of theproviderrecord component.final StringtoString()Returns a string representation of this record class.booleantrustMfa()Returns the value of thetrustMfarecord component.
-
Field Details
-
Constructor Details
-
ProviderTrust
Validates the trust setting.- Throws:
IllegalArgumentException- if the provider is missing.
-
-
Method Details
-
isStrong
Tells whether a sign-in counts as strong, that is, whether it proves identity without a second factor.- Parameters:
upstreamAmr-amrvalues the provider reported, ornullwhen it reported none.- Returns:
truewhen the provider is trusted and itsamrcontains "mfa".
-
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 '=='. -
provider
Returns the value of theproviderrecord component.- Returns:
- the value of the
providerrecord component
-
trustMfa
public boolean trustMfa()Returns the value of thetrustMfarecord component.- Returns:
- the value of the
trustMfarecord component
-