9 Authentication Providers - Reference Documentation
Authors: Burt Beckwith, Beverley Talbott
Version: 2.0.0
9 Authentication Providers
The plugin registers authentication providers that perform authentication by implementing the AuthenticationProvider interface.Property | Default Value | Meaning |
---|---|---|
providerNames | ['daoAuthenticationProvider', 'anonymousAuthenticationProvider', 'rememberMeAuthenticationProvider'] | Bean names of authentication providers. |
daoAuthenticationProvider
to authenticate using the User and Role database tables, rememberMeAuthenticationProvider
to log in with a rememberMe cookie, and anonymousAuthenticationProvider
to create an 'anonymous' authentication if no other provider authenticates.To customize this list, you define a providerNames
attribute with a list of bean names. The beans must be declared either by the plugin, or yourself in resources.groovy
or resources.xml
. Suppose you have a custom MyAuthenticationProvider
in resources.groovy
:beans = { myAuthenticationProvider(com.foo.MyAuthenticationProvider) { // attributes } }
grails-app/conf/Config.groovy
as:grails.plugin.springsecurity.providerNames = [ 'myAuthenticationProvider', 'anonymousAuthenticationProvider', 'rememberMeAuthenticationProvider']