Last change
on this file since 950fa0d was 8bcd64c, checked in by Gjoko Kostadinov <gjoko.kostadinov@…>, 18 months ago |
Add admin functionality and business admin functionality.
|
-
Property mode
set to
100644
|
File size:
1.0 KB
|
Line | |
---|
1 | package edu.gjoko.schedlr.config;
|
---|
2 |
|
---|
3 | import org.springframework.context.annotation.Bean;
|
---|
4 | import org.springframework.context.annotation.Configuration;
|
---|
5 | import org.springframework.security.config.core.GrantedAuthorityDefaults;
|
---|
6 | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
---|
7 | import org.springframework.security.web.authentication.AuthenticationFailureHandler;
|
---|
8 | import org.springframework.security.web.authentication.AuthenticationSuccessHandler;
|
---|
9 |
|
---|
10 | @Configuration
|
---|
11 | public 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.