| Line 20... |
Line 20... |
| 20 |
web.ignoring().antMatchers("/resources/**").antMatchers("/spicemoney/callback");
|
20 |
web.ignoring().antMatchers("/resources/**").antMatchers("/spicemoney/callback");
|
| 21 |
}
|
21 |
}
|
| 22 |
|
22 |
|
| 23 |
@Override
|
23 |
@Override
|
| 24 |
protected void configure(HttpSecurity http) throws Exception {
|
24 |
protected void configure(HttpSecurity http) throws Exception {
|
| 25 |
http.
|
- |
|
| 26 |
logout().logoutUrl("logmeout").and()
|
25 |
http.logout().logoutUrl("logmeout").and().cors().disable().csrf().disable().authorizeRequests()
|
| 27 |
.cors().disable().csrf().disable()
|
- |
|
| 28 |
.authorizeRequests()
|
- |
|
| 29 |
//.antMatchers("/**").hasRole("hdfc")
|
26 |
// .antMatchers("/**").hasRole("hdfc")
|
| 30 |
.antMatchers("/hdfc/**").hasRole("hdfc")
|
27 |
.antMatchers("/hdfc/**").hasRole("hdfc").antMatchers("/imei/validate").hasRole("paytail")
|
| 31 |
.antMatchers("/spicemoney/callback").hasRole("spicemoney")
|
28 |
.antMatchers("/spicemoney/callback").hasRole("spicemoney").antMatchers("/hdfctest/**")
|
| 32 |
.antMatchers("/hdfctest/**").hasRole("hdfctest")
|
- |
|
| 33 |
.antMatchers("/**").permitAll()
|
29 |
.hasRole("hdfctest").antMatchers("/**").permitAll().and().httpBasic()
|
| 34 |
.and()
|
- |
|
| 35 |
.httpBasic()
|
- |
|
| 36 |
.authenticationEntryPoint(myBasicAuthenticationEntryPoint);
|
30 |
.authenticationEntryPoint(myBasicAuthenticationEntryPoint);
|
| 37 |
}
|
31 |
}
|
| 38 |
|
32 |
|
| 39 |
@Autowired
|
33 |
@Autowired
|
| 40 |
protected void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
34 |
protected void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
|
| 41 |
auth.inMemoryAuthentication().withUser("hdfcuser").password("sd123$%^aGg").roles("hdfc").and()
|
35 |
auth.inMemoryAuthentication().withUser("hdfcuser").password("sd123$%^aGg").roles("hdfc").and()
|
| 42 |
.withUser("hdfctestuser").password("test").roles("hdfctest").and()
|
36 |
.withUser("hdfctestuser").password("test").roles("hdfctest").and().withUser("spicemoney")
|
| 43 |
.withUser("spicemoney").password("$SMT123MONEY").roles("spicemoney");
|
37 |
.password("$SMT123MONEY").roles("spicemoney").and().withUser("paytail").password("$SDP@yTa!l")
|
| - |
|
38 |
.roles("paytail");
|
| 44 |
}
|
39 |
}
|
| 45 |
|
40 |
|
| 46 |
}
|
41 |
}
|