kaleidos / grails-security-stateless

Grails plugin to implement stateless authentication using Spring Security
Apache License 2.0
17 stars 8 forks source link

Fix not present token in validation #20

Closed mgdelacroix closed 9 years ago

mgdelacroix commented 9 years ago

When receiving a request to a secured endpoint without token, the server would fail with a 500 error because of trying to execute a startsWith method on a null object.

This patch protects the validateAndExtractToken methods of this failure checking if the token is present and raising a StatelessValidationException.