Last change
on this file since f29cd58 was 77205be, checked in by gjoko kostadinov <gjokokostadinov@…>, 9 months ago |
Add entire code
|
-
Property mode
set to
100755
|
File size:
899 bytes
|
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 |
|
---|
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.