Spring Security OAuth plugin
Dependency :
compile ":spring-security-oauth:2.0.1.1"Custom repositories :
mavenRepo "http://grails.org/plugins" mavenRepo "http://maven.springframework.org/release/" mavenRepo "http://maven.springframework.org/snapshot/" mavenRepo "http://maven.springframework.org/milestone/" mavenRepo "http://repo.desirableobjects.co.uk/"
Summary
Adds OAuth-based authentication to the
Spring Security plugin using the
OAuth plugin. This plugin provides an OAuth realm that can easily be integrated
into existing applications and a host of utility functions to make things like "log in with Twitter" almost trivial.
Installation
grails install-plugin spring-security-oauth
Description
Usage:then, follow Spring Security Core and OAuth plugins documentation.Once you have an user domain and configured provider names, go with:that creates an OAuthID class in the specified package.Example:Finally, addto you user domain class and use this lines in your login view:That's it!
grails install-plugin spring-security-oauth
grails s2-init-oauth [domain-class-package] [oauthid-class-name]grails s2-init-oauth com.yourapp OAuthID
static hasMany = [oAuthIDs: OAuthID]<oauth:connect provider="twitter" id="twitter-connect-link">Twitter</oauth:connect> <oauth:connect provider="facebook" id="facebook-connect-link">Facebook</oauth:connect> <oauth:connect provider="google" id="google-connect-link">Google</oauth:connect> <oauth:connect provider="yahoo" id="yahoo-connect-link">Yahoo</oauth:connect>