Record Class ProviderAccount
java.lang.Object
java.lang.Record
org.jwcarman.who.oidc.ProviderAccount
- Record Components:
registration- the registration it signed in throughsubject- the account's identifier at the provider, stable for the life of the accountdisplayName- what to call the account on the confirm screenverifiedEmail- the account's email, only when the provider is trusted for email and marks it verifiedclaims- the ID token's simple-valued claims (text, true/false and numbers), for the sign-up policy; empty for a provider that is not OpenID Connect
-
Constructor Summary
ConstructorsConstructorDescriptionProviderAccount(SignInRegistration registration, String subject, String displayName, Optional<String> verifiedEmail, Map<String, Object> claims) Copies the claims and checks that nothing is missing. -
Method Summary
Modifier and TypeMethodDescriptionclaims()Returns the value of theclaimsrecord component.Returns the value of thedisplayNamerecord component.final booleanIndicates whether some other object is "equal to" this one.static ProviderAccountfrom(org.springframework.security.oauth2.core.user.OAuth2User user, SignInRegistration registration) Reads the account from what Spring Security signed in.final inthashCode()Returns a hash code value for this object.Returns the value of theregistrationrecord component.subject()Returns the value of thesubjectrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of theverifiedEmailrecord component.
-
Constructor Details
-
ProviderAccount
-
-
Method Details
-
from
public static ProviderAccount from(org.springframework.security.oauth2.core.user.OAuth2User user, SignInRegistration registration) Reads the account from what Spring Security signed in.- Parameters:
user- the provider's userregistration- the registration it signed in through- Returns:
- the account
- Throws:
IllegalStateException- when the provider did not return the subject attribute
-
toString
-
hashCode
-
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). -
registration
Returns the value of theregistrationrecord component.- Returns:
- the value of the
registrationrecord component
-
subject
-
displayName
Returns the value of thedisplayNamerecord component.- Returns:
- the value of the
displayNamerecord component
-
verifiedEmail
Returns the value of theverifiedEmailrecord component.- Returns:
- the value of the
verifiedEmailrecord component
-
claims
-