source: src/main/java/edu/gjoko/schedlr/config/AppConfig.java@ 950fa0d

Last change on this file since 950fa0d was 8bcd64c, checked in by Gjoko Kostadinov <gjoko.kostadinov@…>, 15 months ago

Add admin functionality and business admin functionality.

  • Property mode set to 100644
File size: 1.0 KB
Line 
1package edu.gjoko.schedlr.config;
2
3import org.springframework.context.annotation.Bean;
4import org.springframework.context.annotation.Configuration;
5import org.springframework.security.config.core.GrantedAuthorityDefaults;
6import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
7import org.springframework.security.web.authentication.AuthenticationFailureHandler;
8import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
9
10@Configuration
11public class AppConfig {
12 @Bean
13 public BCryptPasswordEncoder bCryptPasswordEncoder() {
14 return new BCryptPasswordEncoder();
15 }
16
17 @Bean
18 public AuthenticationSuccessHandler appAuthenticationSuccessHandler() {
19 return new AppAuthenticationSuccessHandler();
20 }
21
22 @Bean
23 public AuthenticationFailureHandler appAuthenticationFailureHandler() {
24 return new AppAuthenticationFailureHandler();
25 }
26
27 @Bean
28 GrantedAuthorityDefaults grantedAuthorityDefaults() {
29 return new GrantedAuthorityDefaults("");
30 }
31}
Note: See TracBrowser for help on using the repository browser.