Class SecurityConfiguration
- java.lang.Object
-
- org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
-
- edu.cnm.deepdive.tunefull.configuration.SecurityConfiguration
-
- All Implemented Interfaces:
org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,org.springframework.security.config.annotation.web.builders.WebSecurity>
,org.springframework.security.config.annotation.web.WebSecurityConfigurer<org.springframework.security.config.annotation.web.builders.WebSecurity>
@Configuration @EnableWebSecurity public class SecurityConfiguration extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
Provides security functions for the TuneFull Application, and provides for authentication between the client app and the server.- Since:
- 1.0
- Version:
- 1.0
- Author:
- Robert Dominugez, Roderick Frechette, Laura Steiner
-
-
Constructor Summary
Constructors Constructor Description SecurityConfiguration(UserService userService)
Constructor forSecurityConfiguration
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
Allows for specification of which endpoints need security and which do not (i.e.org.springframework.security.oauth2.jwt.JwtDecoder
jwtDecoder()
Because the basic spring decoder only validates dates, this bean allows for specialized validation.-
Methods inherited from class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
authenticationManager, authenticationManagerBean, configure, configure, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean
-
-
-
-
Constructor Detail
-
SecurityConfiguration
public SecurityConfiguration(UserService userService)
Constructor forSecurityConfiguration
.- Parameters:
userService
- UserService
-
-
Method Detail
-
configure
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws java.lang.Exception
Allows for specification of which endpoints need security and which do not (i.e. which endpoints need the user to be logged in).- Overrides:
configure
in classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
- Parameters:
http
- HttpSecurity- Throws:
java.lang.Exception
- if something goes wrong.
-
jwtDecoder
@Bean public org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder()
Because the basic spring decoder only validates dates, this bean allows for specialized validation.- Returns:
- JwtDecoder
-
-