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
|
Rev | Line | |
---|
[401a211] | 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;
|
---|
[8bcd64c] | 7 | import org.springframework.security.web.authentication.AuthenticationFailureHandler;
|
---|
[401a211] | 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
|
---|
[8bcd64c] | 18 | public AuthenticationSuccessHandler appAuthenticationSuccessHandler() {
|
---|
[401a211] | 19 | return new AppAuthenticationSuccessHandler();
|
---|
| 20 | }
|
---|
| 21 |
|
---|
[8bcd64c] | 22 | @Bean
|
---|
| 23 | public AuthenticationFailureHandler appAuthenticationFailureHandler() {
|
---|
| 24 | return new AppAuthenticationFailureHandler();
|
---|
| 25 | }
|
---|
| 26 |
|
---|
[401a211] | 27 | @Bean
|
---|
| 28 | GrantedAuthorityDefaults grantedAuthorityDefaults() {
|
---|
| 29 | return new GrantedAuthorityDefaults("");
|
---|
| 30 | }
|
---|
| 31 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.