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

Last change on this file was 77205be, checked in by gjoko kostadinov <gjokokostadinov@…>, 6 months ago

Add entire code

  • Property mode set to 100755
File size: 899 bytes
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
18 @Bean
19 public AuthenticationFailureHandler appAuthenticationFailureHandler() {
20 return new AppAuthenticationFailureHandler();
21 }
22
23 @Bean
24 GrantedAuthorityDefaults grantedAuthorityDefaults() {
25 return new GrantedAuthorityDefaults("");
26 }
27}
Note: See TracBrowser for help on using the repository browser.