Plugins You can find out about all the publicly available Grails plugins.

LinkedIn for Spring Security OAuth plugin

1 vote
compile "org.grails.plugins:spring-security-oauth-linkedin:0.2"

 Documentation  Source  Issues



Add the following to your grails-app/conf/BuildConfig
plugins {
	compile ':spring-security-oauth-linkedin:0.1'


Add to your Config:
oauth {
  providers {
    linkedin {
      api = org.scribe.builder.api.LinkedInApi
      key = 'oauth_linkedin_key'
      secret = 'oauth_linkedin_secret'
      successUri = '/oauth/linkedin/success'
      failureUri = '/oauth/linkedin/error'
      callback = "${baseURL}/oauth/linkedin/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="linkedin" id="linkedin-connect-link">Linkedin</oauth:connect>

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