Class SecurityConfiguration
- java.lang.Object
-
- org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
-
- edu.cnm.deepdive.albuquirky.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.WebSecurityConfigurerAdapterThe SecurityConfiguration class handles the security for the AlbuQuirky web server application by checking the credentials for the web server match the Google Cloud credentials for the project.
-
-
Constructor Summary
Constructors Constructor Description SecurityConfiguration(ProfileService profileService)Constructor for theSecurityConfigurationclass.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidconfigure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)org.springframework.security.oauth2.jwt.JwtDecoderjwtDecoder()This method validates the JWT token received from the Google Cloud service, and returns aJwtDecoderobject.-
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
@Autowired public SecurityConfiguration(ProfileService profileService)
Constructor for theSecurityConfigurationclass. It sets the reference to theProfileServicefor the field.- Parameters:
profileService- An instance ofProfileService.
-
-
Method Detail
-
configure
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception- Overrides:
configurein classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter- Throws:
Exception
-
jwtDecoder
@BeanProperty public org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder()
This method validates the JWT token received from the Google Cloud service, and returns aJwtDecoderobject.- Returns:
- The
JWTtoken decoder.
-
-