gingeleski / cucumber-spring-security-tests

Cucumber/BDD security tests example for Java (Spring Boot API).
9 stars 8 forks source link

@PreAuthorize("isAuthenticated()") just redirects #21

Closed gingeleski closed 4 years ago

gingeleski commented 6 years ago

Noticed this working #19 - pushing that buggy, will use this issue to hunt down what's going on with that

Test cases are expecting a 200 or 403 depending on the circumstances, and getting neither. 😭

gingeleski commented 6 years ago

For reference, this only seems to affect the logout method in UserController.java.

The similarly annotated methods in RoomController.java do not exhibit this behavior. Their tests pass fine.

gingeleski commented 4 years ago

Need to confirm this is still an issue after #44 overhaul.

(I doubt it is, but needs a spot check.)

gingeleski commented 4 years ago

Confirmed this is no longer an issue. Authenticated, then hit GET /api/rooms to yield the following 200 response...

[ {
  "roomName" : "NY_SYRACUSE_123SMITH_101_SHARE_3S",
  "seats" : 3
}, {
  "roomName" : "NY_SYRACUSE_123SMITH_201A_MEETING_6S",
  "seats" : 6
}, {
  "roomName" : "NY_SYRACUSE_123SMITH_201B_MEETING_8S",
  "seats" : 8
} ]