source: src/main/java/com/project/beautycenter/config/securityConfig.java@ 850b344

Last change on this file since 850b344 was 850b344, checked in by Tamara Simikj <tamara.simic12@…>, 2 years ago

Initial commit

  • Property mode set to 100644
File size: 1.3 KB
Line 
1package com.project.beautycenter.config;
2
3import org.springframework.beans.factory.annotation.Autowired;
4import org.springframework.context.annotation.Configuration;
5import org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder;
6import org.springframework.security.config.annotation.web.builders.HttpSecurity;
7import org.springframework.security.config.annotation.web.builders.WebSecurity;
8import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity;
9import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
10import org.springframework.security.core.userdetails.UserDetailsService;
11
12@Configuration
13@EnableWebSecurity
14public class securityConfig extends WebSecurityConfigurerAdapter {
15
16 @Autowired
17 private UserDetailsService userDetailsService;
18
19
20 @Override
21 public void configure(WebSecurity web) throws Exception {
22
23 web.ignoring().antMatchers("/**");
24 }
25
26 @Override
27 protected void configure(HttpSecurity http) throws Exception {
28 http.sessionManagement().enableSessionUrlRewriting(false);
29
30 }
31
32 @Override
33 protected void configure(AuthenticationManagerBuilder auth) throws Exception {
34 auth.userDetailsService(this.userDetailsService);
35
36 }
37}
Note: See TracBrowser for help on using the repository browser.