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

    Fields
    Modifier and Type
    Field
    Description
    private final SocialProperties
    Settings of the providers, for the tenants Microsoft is limited to.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface java.util.function.Function

    andThen, compose
  • Field Details

    • properties

      private final SocialProperties 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:
      apply in interface Function<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.