{"id":19714015,"url":"https://github.com/grails/grails-spring-security-oauth2","last_synced_at":"2025-04-29T18:31:45.234Z","repository":{"id":38887465,"uuid":"131869771","full_name":"grails/grails-spring-security-oauth2","owner":"grails","description":"Spring security Oauth Grails 3 plugin","archived":false,"fork":false,"pushed_at":"2024-10-04T01:41:34.000Z","size":1267,"stargazers_count":5,"open_issues_count":17,"forks_count":13,"subscribers_count":10,"default_branch":"3.0.x","last_synced_at":"2024-11-02T12:22:24.918Z","etag":null,"topics":["grails","grails-plugins","oauth2","spring-security"],"latest_commit_sha":null,"homepage":"https://grails.github.io/grails-spring-security-oauth2/","language":"Groovy","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grails.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-05-02T15:22:30.000Z","updated_at":"2024-06-28T13:26:27.000Z","dependencies_parsed_at":"2023-10-16T22:59:55.025Z","dependency_job_id":"ae4f5f1d-fab4-4267-be1f-6fed687860be","html_url":"https://github.com/grails/grails-spring-security-oauth2","commit_stats":{"total_commits":122,"total_committers":15,"mean_commits":8.133333333333333,"dds":0.7377049180327868,"last_synced_commit":"fa940a6e9c3a0ab74ba7473632d13569b1b26255"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grails%2Fgrails-spring-security-oauth2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grails%2Fgrails-spring-security-oauth2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grails%2Fgrails-spring-security-oauth2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grails%2Fgrails-spring-security-oauth2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grails","download_url":"https://codeload.github.com/grails/grails-spring-security-oauth2/tar.gz/refs/heads/3.0.x","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223979394,"owners_count":17235391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["grails","grails-plugins","oauth2","spring-security"],"created_at":"2024-11-11T22:28:13.706Z","updated_at":"2024-11-11T22:28:16.048Z","avatar_url":"https://github.com/grails.png","language":"Groovy","funding_links":[],"categories":[],"sub_categories":[],"readme":"Spring Security OAuth2 Plugin\n=======\n[![Java CI](https://github.com/grails/grails-spring-security-oauth2/actions/workflows/gradle.yml/badge.svg)](https://github.com/grails/grails-spring-security-oauth2/actions/workflows/gradle.yml)\n\nMain differences with the Grails 2 plugin:\n\n- no more dependency on https://github.com/antony/grails-oauth-scribe but some code of that plugin was ported in this\n- Relies on [Scribejava](https://github.com/scribejava/scribejava) to do most of the OAuth logic\n- simplest code as possible\n- easy to extend\n\nDocumentation\n------------\n[User Guide](https://grails.github.io/grails-spring-security-oauth2/)\n\nInstallation\n------------\nFor Grails 5.3+\n\nAdd the following dependencies in `build.gradle`\n```\ndependencies {\n...\n    implementation 'org.grails.plugins:spring-security-core:5.2.1'\n    implementation 'org.grails.plugins:spring-security-oauth2:3.0.0'\n...\n}\n```\nYou will also need at least one provider extension, i.e the `grails-spring-security-oauth2-google` plugin\nChange the version to reflect the actual version you would like to use.\n\nYou can configure the following parameters in your `application.yml`. This is fully optional\n```\ngrails:\n    plugin:\n        springsecurity:\n            oauth2:\n                active: true    #whether the whole plugin is active or not\n                registration:\n                    askToLinkOrCreateAccountUri: '/oauth2/ask' # The URI that is called to aks the user to either create a new account or link to an existing account\n                    roleNames: ['ROLE_USER'] #A list of role names that should be automatically granted to an OAuth User. The roles will be created if they do not exist\n```\n\nOnce you have an User domain class, initialize this plugin by using the init script `grails init-oauth2 \u003cdomain-class-package\u003e \u003cuser-class-name\u003e \u003coauthid-class-name\u003e`\nIn example: `grails init-oauth2 com.yourapp User OAuthID`\nThat will create the domain class `com.yourapp.oAuthID`\n\nFinally add:\n```groovy\nstatic hasMany = [oAuthIDs: OAuthID]\n```\nto your user domain class.\n\nExtensions\n----------\n\nList of known extension\n* [Google](https://github.com/grails-plugins/grails-spring-security-oauth2-google)\n* [Facebook](https://github.com/MatrixCrawler/grails-spring-security-oauth2-facebook)\n* [Github] (https://github.com/rpalcolea/grails-spring-security-oauth2-github)\n\n\nHow to create a new provider plugin\n-----------------------------------\n1. Create a new plugin with `grails create-plugin spring-security-oauth2-myProvider`\n2. Add the following plugins as dependency in `build.gradle`:\n    * `compileOnly 'org.grails.plugins:spring-security-core:3.+'`\n    * `compileOnly 'org.grails.plugins:spring-security-oauth2:1.1.+'`\n3. Create a service in your plugin that extends `OAuth2AbstractProviderService` and implement the abstract methods. You can override the other methods for fine-tuning if needed.\n\n\nLicense\n-------\n\nApache 2\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrails%2Fgrails-spring-security-oauth2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrails%2Fgrails-spring-security-oauth2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrails%2Fgrails-spring-security-oauth2/lists"}