kaleidos / grails-security-stateless

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

Add check for exception when validating the token #22

Closed mgdelacroix closed 9 years ago

mgdelacroix commented 9 years ago

In the stateless filter, the validation of the token is suitable of throwing exceptions, but those were unchecked so the server could fail with a 500 error.

This patch is a proposal of protecting this validation with a simple error message with the 401, formatted as

401 {"message": exception.message}