Class HawaiiResourceServerConfigurerAdapter

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

    @EnableWebSecurity
    @EnableResourceServer
    @Deprecated
    public class HawaiiResourceServerConfigurerAdapter
    extends org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter
    Deprecated.
    See the * OAuth 2.0 Migration Guide for Spring Security 5. Among others, creating a TokenStore bean is no longer necessary.
    Configuration class for the HawaiiTokenServices. A JWT decoder can be created like so:
    Since:
    3.0.0
    Author:
    Wouter Eerdekens, Jules Houben
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      org.springframework.security.oauth2.provider.token.TokenStore jwkTokenStore​(org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties properties)
      Deprecated.
      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)
      Deprecated.
      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)
      Deprecated.
      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()
        Deprecated.
    • Method Detail

      • jwkTokenStore

        @Bean
        public org.springframework.security.oauth2.provider.token.TokenStore jwkTokenStore​(org.springframework.boot.autoconfigure.security.oauth2.resource.ResourceServerProperties properties)
        Deprecated.
        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)
        Deprecated.
        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)
        Deprecated.
        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