Package com.wilfredmorgan.api.config
Class ResourceServerConfig
- java.lang.Object
-
- org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter
-
- com.wilfredmorgan.api.config.ResourceServerConfig
-
- All Implemented Interfaces:
org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurer
@Configuration @EnableResourceServer public class ResourceServerConfig extends org.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapterOnce the client has gained authorization, users need to gain authentication. This class is response for handling that. It also configures which roles have access to which endpoints. So controls the users' access!
-
-
Constructor Summary
Constructors Constructor Description ResourceServerConfig()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidconfigure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)This method configures which roles can access which endpointsvoidconfigure(org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer resources)
-
-
-
Method Detail
-
configure
public void configure(org.springframework.security.oauth2.config.annotation.web.configurers.ResourceServerSecurityConfigurer resources)
- Specified by:
configurein interfaceorg.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurer- Overrides:
configurein classorg.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter
-
configure
public void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws java.lang.ExceptionThis method configures which roles can access which endpoints- Specified by:
configurein interfaceorg.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurer- Overrides:
configurein classorg.springframework.security.oauth2.config.annotation.web.configuration.ResourceServerConfigurerAdapter- Parameters:
http- Our HttpSecurity object that is maintains by Spring- Throws:
java.lang.Exception- in case the configurations fails
-
-