Last change
on this file since 943857c was 77205be, checked in by gjoko kostadinov <gjokokostadinov@…>, 6 months ago |
Add entire code
|
-
Property mode
set to
100755
|
File size:
899 bytes
|
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 |
|
---|
[8bcd64c] | 18 | @Bean
|
---|
| 19 | public AuthenticationFailureHandler appAuthenticationFailureHandler() {
|
---|
| 20 | return new AppAuthenticationFailureHandler();
|
---|
| 21 | }
|
---|
| 22 |
|
---|
[401a211] | 23 | @Bean
|
---|
| 24 | GrantedAuthorityDefaults grantedAuthorityDefaults() {
|
---|
| 25 | return new GrantedAuthorityDefaults("");
|
---|
| 26 | }
|
---|
| 27 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.