Class HawaiiResourceServerConfigurerAdapter

  • All Implemented Interfaces:
    org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurer

    @EnableWebSecurity
    @EnableResourceServer
    public class HawaiiResourceServerConfigurerAdapter
    extends org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter
    Configuration class for the HawaiiTokenServices.
    Since:
    3.0.0
    Author:
    Wouter Eerdekens, Jules Houben
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.security.oauth2.provider.token.TokenStore jwkTokenStore​(org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties properties)
      Bean configuration of a JwkTokenStore which does the actual Jwk checks.
      org.springframework.security.oauth2.client.OAuth2RestOperations oAuth2RestOperations​(org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails resource, org.springframework.security.oauth2.client.OAuth2ClientContext clientContext)
      Bean configuration of the OAuth2RestTemplate to use to access the user info endpoint.
      org.springframework.security.oauth2.provider.token.ResourceServerTokenServices resourceServerTokenServices​(org.springframework.security.oauth2.provider.token.TokenStore jwkTokenStore, org.springframework.security.oauth2.client.OAuth2RestOperations restTemplate, org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties properties, org.springframework.boot.autoconfigure.security.oauth2.resource.PrincipalExtractor principalExtractor, Cache<org.springframework.security.core.Authentication> authenticationCache)
      Bean configuration of the HawaiiTokenServices to use.
      • Methods inherited from class org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter

        configure, configure
    • Constructor Detail

      • HawaiiResourceServerConfigurerAdapter

        public HawaiiResourceServerConfigurerAdapter()
    • Method Detail

      • jwkTokenStore

        @Bean
        public org.springframework.security.oauth2.provider.token.TokenStore jwkTokenStore​(org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties properties)
        Bean configuration of a JwkTokenStore which does the actual Jwk checks.
        Parameters:
        properties - the ResourceServerProperties
        Returns:
        the bean
      • oAuth2RestOperations

        @Bean
        @Primary
        public org.springframework.security.oauth2.client.OAuth2RestOperations oAuth2RestOperations​(org.springframework.security.oauth2.client.resource.OAuth2ProtectedResourceDetails resource,
                                                                                                    org.springframework.security.oauth2.client.OAuth2ClientContext clientContext)
        Bean configuration of the OAuth2RestTemplate to use to access the user info endpoint.
        Parameters:
        resource - the protected resource details
        clientContext - the client context
        Returns:
        the bean
      • resourceServerTokenServices

        @Bean
        public org.springframework.security.oauth2.provider.token.ResourceServerTokenServices resourceServerTokenServices​(org.springframework.security.oauth2.provider.token.TokenStore jwkTokenStore,
                                                                                                                          org.springframework.security.oauth2.client.OAuth2RestOperations restTemplate,
                                                                                                                          org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties properties,
                                                                                                                          org.springframework.boot.autoconfigure.security.oauth2.resource.PrincipalExtractor principalExtractor,
                                                                                                                          Cache<org.springframework.security.core.Authentication> authenticationCache)
        Bean configuration of the HawaiiTokenServices to use.
        Parameters:
        jwkTokenStore - the jwk token store
        restTemplate - the rest template
        properties - the resource server properties
        principalExtractor - the principal extractor
        authenticationCache - the cache to store the user info authentication
        Returns:
        the bean