Skip to content
This repository was archived by the owner on Mar 10, 2025. It is now read-only.

Commit 859fb03

Browse files
authored
Merge pull request #87 from gsartori/4.0.x
Readme cleanups
2 parents 373677c + 4f4824b commit 859fb03

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ Spring Security OAuth2 Plugin
44

55
Main differences with the Grails 2 plugin:
66

7-
- no more dependency on https://github.com/antony/grails-oauth-scribe but some code of that plugin was ported in this
7+
- No more dependency on https://github.com/antony/grails-oauth-scribe but some code of that plugin was ported in this
88
- Relies on [Scribejava](https://github.com/scribejava/scribejava) to do most of the OAuth logic
9-
- simplest code as possible
10-
- easy to extend
9+
- Simplest code as possible
10+
- Easy to extend
1111

1212
Documentation
1313
------------
@@ -18,7 +18,7 @@ Installation
1818
For Grails 5.3+
1919

2020
Add the following dependencies in `build.gradle`
21-
```
21+
```groovy
2222
dependencies {
2323
...
2424
implementation 'org.grails.plugins:spring-security-core:5.2.1'
@@ -30,15 +30,17 @@ You will also need at least one provider extension, i.e the `grails-spring-secur
3030
Change the version to reflect the actual version you would like to use.
3131

3232
You can configure the following parameters in your `application.yml`. This is fully optional
33-
```
33+
```yaml
3434
grails:
35-
plugin:
36-
springsecurity:
37-
oauth2:
38-
active: true #whether the whole plugin is active or not
39-
registration:
40-
askToLinkOrCreateAccountUri: '/oauth2/ask' # The URI that is called to aks the user to either create a new account or link to an existing account
41-
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
35+
plugin:
36+
springsecurity:
37+
oauth2:
38+
active: true #whether the whole plugin is active or not
39+
registration:
40+
# The URI that is called to aks the user to either create a new account or link to an existing account
41+
askToLinkOrCreateAccountUri: '/oauth2/ask'
42+
# A list of role names that should be automatically granted to an OAuth User. The roles will be created if they do not exist
43+
roleNames: [ 'ROLE_USER' ]
4244
```
4345
4446
Once you have an User domain class, initialize this plugin by using the init script `grails init-oauth2 <domain-class-package> <user-class-name> <oauthid-class-name>`
@@ -57,7 +59,8 @@ Extensions
5759
List of known extension
5860
* [Google](https://github.com/grails-plugins/grails-spring-security-oauth2-google)
5961
* [Facebook](https://github.com/MatrixCrawler/grails-spring-security-oauth2-facebook)
60-
* [Github] (https://github.com/rpalcolea/grails-spring-security-oauth2-github)
62+
* [Github](https://github.com/rpalcolea/grails-spring-security-oauth2-github)
63+
* [Okta](https://github.com/oktadev/okta-grails-example)
6164

6265

6366
How to create a new provider plugin

0 commit comments

Comments
 (0)