Class 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
    The 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.
    • 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)  
      org.springframework.security.oauth2.jwt.JwtDecoder jwtDecoder()
      This method validates the JWT token received from the Google Cloud service, and returns a JwtDecoder object.
      • 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 the SecurityConfiguration class. It sets the reference to the ProfileService for the field.
        Parameters:
        profileService - An instance of ProfileService.
    • Method Detail

      • configure

        protected void configure​(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
                          throws Exception
        Overrides:
        configure in class org.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 a JwtDecoder object.
        Returns:
        The JWT token decoder.