Example usage for org.springframework.security.oauth2.jwt NimbusJwtDecoderJwkSupport setJwtValidator

List of usage examples for org.springframework.security.oauth2.jwt NimbusJwtDecoderJwkSupport setJwtValidator

Introduction

In this page you can find the example usage for org.springframework.security.oauth2.jwt NimbusJwtDecoderJwkSupport setJwtValidator.

Prototype

public void setJwtValidator(OAuth2TokenValidator<Jwt> jwtValidator) 

Source Link

Document

Use this Jwt Validator

Usage

From source file:org.springframework.cloud.gcp.autoconfigure.security.IapAuthenticationAutoConfiguration.java

@Bean
@ConditionalOnMissingBean/* ww  w.java 2 s. co m*/
public JwtDecoder iapJwtDecoder(IapAuthenticationProperties properties,
        @Qualifier("iapJwtDelegatingValidator") DelegatingOAuth2TokenValidator<Jwt> validator) {

    NimbusJwtDecoderJwkSupport jwkSupport = new NimbusJwtDecoderJwkSupport(properties.getRegistry(),
            properties.getAlgorithm());
    jwkSupport.setJwtValidator(validator);

    return jwkSupport;
}