Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- "timestamp": 1507840896561,
- "status": 403,
- "error": "Forbidden",
- "message": "Access is denied",
- "path": "/teacher/dashboard"
- http
- .authorizeRequests()
- .antMatchers("/").permitAll()
- .antMatchers("/login").permitAll()
- .antMatchers("/api/register").permitAll()
- .antMatchers("/teacher/**").hasRole("TEACHER")
- .anyRequest().authenticated()
- .and()
- .formLogin()
- .loginPage("/login")
- .permitAll()
- .and()
- .logout()
- .permitAll();
- http
- .csrf().disable();
- http
- .formLogin()
- .defaultSuccessUrl("/", true)
- .and()
- .addFilterBefore(new SimpleCorsFilter(), ChannelProcessingFilter.class)
- .addFilter(new JWTAuthenticationFilter(authenticationManager()))
- .addFilter(new JWTAuthorizationFilter(authenticationManager()));
- {
- "sub": "org.springframework.security.core.userdetails.User@394ca6ef: Username: teacher@postman.com; Password: [PROTECTED]; Enabled: true; AccountNonExpired: true; credentialsNonExpired: true; AccountNonLocked: true; Granted Authorities: ROLE_TEACHER",
- "exp": 1508704641
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement