Facebook support for Grails Spring Security OAuth
Groovy Batchfile
Switch branches/tags
Nothing to show
Latest commit 627520c Sep 21, 2015 @donbeave Update README.md
Permalink
Failed to load latest commit information.
grails-app
src/groovy/grails/plugin/springsecurity/oauth
test/unit/grails/plugin/springsecurity/oauth
wrapper
.gitignore
.travis.yml
LICENSE
README.md
SpringSecurityOauthFacebookGrailsPlugin.groovy
application.properties
grailsw
grailsw.bat

README.md

grails-spring-security-oauth-facebook Build Status

Facebook extension for Grails Spring Security OAuth plugin

Installation

Add the following plugin definition to your BuildConfig:

// ...
plugins {
  // ...
  compile ':spring-security-oauth:2.0.2'
  compile ':spring-security-oauth-facebook:0.1'
  // ...
}

Usage

Add to your Config:

oauth {
  // ...
  providers {
    // ...
    facebook {
      api = org.scribe.builder.api.FacebookApi
      key = 'oauth_facebook_key'
      secret = 'oauth_facebook_secret'
      successUri = '/oauth/facebook/success'
      failureUri = '/oauth/facebook/error'
      callback = "${baseURL}/oauth/facebook/callback"
    }
    // ...
  }
}

In your view you can use the taglib exposed from this plugin and from OAuth plugin to create links and to know if the user is authenticated with a given provider:

<oauth:connect provider="facebook" id="facebook-connect-link">Facebook</oauth:connect>

Logged with facebook?
<s2o:ifLoggedInWith provider="facebook">yes</s2o:ifLoggedInWith>
<s2o:ifNotLoggedInWith provider="facebook">no</s2o:ifNotLoggedInWith>

Copyright and license

Copyright 2012-2014 Mihai Cazacu, Enrico Comiti and Alexey Zhokhov under the Apache License, Version 2.0. Supported by AZ.