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
    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
    • 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SecurityConfiguration

        public SecurityConfiguration​(UserService userService)
        Constructor for SecurityConfiguration.
        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 class org.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