Ignore:
Timestamp:
12/26/23 18:50:43 (6 months ago)
Author:
gjoko kostadinov <gjokokostadinov@…>
Branches:
master
Children:
1413ee2
Parents:
950fa0d
Message:

Add entire code

Location:
src/main/java/edu/gjoko/schedlr/config
Files:
1 added
1 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • src/main/java/edu/gjoko/schedlr/config/AppAuthenticationEntryPoint.java

    • Property mode changed from 100644 to 100755
  • src/main/java/edu/gjoko/schedlr/config/AppAuthenticationFailureHandler.java

    • Property mode changed from 100644 to 100755
  • src/main/java/edu/gjoko/schedlr/config/AppConfig.java

    • Property mode changed from 100644 to 100755
    r950fa0d r77205be  
    1515    }
    1616
    17     @Bean
    18     public AuthenticationSuccessHandler appAuthenticationSuccessHandler() {
    19         return new AppAuthenticationSuccessHandler();
    20     }
    2117
    2218    @Bean
  • src/main/java/edu/gjoko/schedlr/config/AppFilter.java

    • Property mode changed from 100644 to 100755
    r950fa0d r77205be  
    6464                            break;
    6565                        case "CUSTOMER":
    66                             page = "/homepage";
     66                            if ("/customer_admin".equals(httpServletRequest.getRequestURI())) {
     67                                page = "/customer_admin";
     68                            } else {
     69                                page = "/homepage";
     70                            }
    6771                            break;
    6872                        case "BUSINESS_OWNER":
  • src/main/java/edu/gjoko/schedlr/config/AppSecurityConfig.java

    • Property mode changed from 100644 to 100755
    r950fa0d r77205be  
    3232    private final BCryptPasswordEncoder passwordEncoder;
    3333
    34     private final AuthenticationSuccessHandler authenticationSuccessHandler;
    35 
    3634    private final AuthenticationFailureHandler authenticationFailureHandler;
    3735
     
    5755                .loginPage("/login")
    5856                .loginProcessingUrl("/login")
    59                 .successHandler(authenticationSuccessHandler)
    6057                .failureHandler(authenticationFailureHandler)
    61                 .defaultSuccessUrl("/homepage")
     58                .defaultSuccessUrl("/login")
    6259                .and()
    6360                .logout(logout -> logout
  • src/main/java/edu/gjoko/schedlr/config/MvcConfig.java

    • Property mode changed from 100644 to 100755
    r950fa0d r77205be  
    1616        registry.addViewController("/admin").setViewName("admin");
    1717        registry.addViewController("/business_admin").setViewName("business_admin");
     18        registry.addViewController("/customer_admin").setViewName("customer_admin");
    1819    }
    1920}
Note: See TracChangeset for help on using the changeset viewer.