Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
gradle/wrapper
grails-app
src/main/groovy/grails/plugin/springsecurity/oauth2/ok
.gitignore
LICENSE
README.md
build.gradle
gradle.properties
gradlew
gradlew.bat
settings.gradle

README.md

Spring Security OAuth2 Odnoklassniki Plugin

Download

Add a Odnoklassniki OAuth2 provider to the Spring Security OAuth2 Plugin.

Installation

Add the following dependencies in build.gradle

repositories {
  ...
  maven { url "http://dl.bintray.com/purpleraven/plugins" }
  ...
}

dependencies {
...
    compile 'org.grails.plugins:spring-security-oauth2:1.1+'
    compile 'org.grails.plugins:spring-security-oauth2-ok:1.0'
...
}

Usage

Add this to your application.yml

grails:
    plugin:
        springsecurity:
            oauth2:
                providers:
                    odnoklassniki:
                        api_key: 'odnoklassniki-api-key'               #needed
                        api_secret: 'odnoklassniki-api-secret'         #needed
                        successUri: "/oauth2/odnoklassniki/success"    #optional
                        failureUri: "/oauth2/odnoklassniki/failure"    #optional
                        callback: "/oauth2/odnoklassniki/callback"     #optional

You can replace the URIs with your own controller implementation.

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:

<oauth2:connect provider="odnoklassniki" id="odnoklassniki-connect-link">odnoklassniki</oauth2:connect>

Logged with odnoklassniki?
<oauth2:ifLoggedInWith provider="odnoklassniki">yes</oauth2:ifLoggedInWith>
<oauth2:ifNotLoggedInWith provider="odnoklassniki">no</oauth2:ifNotLoggedInWith>

License

Apache 2

You can’t perform that action at this time.