Class IdTokenValidatorFactory
java.lang.Object
com.irurueta.authserver.authorization.api.web.social.IdTokenValidatorFactory
- All Implemented Interfaces:
Function<org.springframework.security.oauth2.client.registration.ClientRegistration,org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>>
public class IdTokenValidatorFactory
extends Object
implements Function<org.springframework.security.oauth2.client.registration.ClientRegistration,org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>>
Chooses the validator of the ID token of each registration: the framework's
OidcIdTokenValidator, plus the
EntraIssuerValidator for Microsoft (registered without an issuer, see ClientRegistrationMapper).
It is the jwtValidatorFactory of the OidcIdTokenDecoderFactory, which replaces the default validator,
so the framework's checks of the audience, the timestamps and the subject stay.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final SocialPropertiesSettings of the providers, for the tenants Microsoft is limited to. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt> apply(org.springframework.security.oauth2.client.registration.ClientRegistration registration) Builds the validator of a registration.
-
Field Details
-
properties
Settings of the providers, for the tenants Microsoft is limited to.
-
-
Constructor Details
-
IdTokenValidatorFactory
public IdTokenValidatorFactory()
-
-
Method Details
-
apply
public org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt> apply(org.springframework.security.oauth2.client.registration.ClientRegistration registration) Builds the validator of a registration.- Specified by:
applyin interfaceFunction<org.springframework.security.oauth2.client.registration.ClientRegistration,org.springframework.security.oauth2.core.OAuth2TokenValidator<org.springframework.security.oauth2.jwt.Jwt>> - Parameters:
registration- the registration the token was issued for.- Returns:
- the validator.
-