Orca Ninja
Orca Ninja

Reputation: 833

Grails Spring Security Plugin: Logon directly from the controller

With the grails spring security plugin, is it possible to login a user by passing their user name and password into a method e.g. logon(username, password)? If so, how can I implement it.

Thanks

Upvotes: 0

Views: 129

Answers (1)

Burt Beckwith
Burt Beckwith

Reputation: 75681

Why do you want to do this? The way Spring Security is implemented is by a filter chain, and the plugin helps configure that. There are multiple steps involved in authenticating a user and checking that the user is authorized to access various urls. The controller is there as a helper, but the real work is done in the filters. You can customize how it works, but it's not as simple as routing the logic through a controller.

Upvotes: 2

Related Questions