diff --git a/README.md b/README.md index 9ae6e3f..35ff67c 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,10 @@ Spring Security OAuth2 Plugin Main differences with the Grails 2 plugin: -- no more dependency on https://github.com/antony/grails-oauth-scribe but some code of that plugin was ported in this +- No more dependency on https://github.com/antony/grails-oauth-scribe but some code of that plugin was ported in this - Relies on [Scribejava](https://github.com/scribejava/scribejava) to do most of the OAuth logic -- simplest code as possible -- easy to extend +- Simplest code as possible +- Easy to extend Documentation ------------ @@ -18,7 +18,7 @@ Installation For Grails 5.3+ Add the following dependencies in `build.gradle` -``` +```groovy dependencies { ... 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 Change the version to reflect the actual version you would like to use. You can configure the following parameters in your `application.yml`. This is fully optional -``` +```yaml grails: - plugin: - springsecurity: - oauth2: - active: true #whether the whole plugin is active or not - registration: - askToLinkOrCreateAccountUri: '/oauth2/ask' # The URI that is called to aks the user to either create a new account or link to an existing account - 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 + plugin: + springsecurity: + oauth2: + active: true #whether the whole plugin is active or not + registration: + # The URI that is called to aks the user to either create a new account or link to an existing account + askToLinkOrCreateAccountUri: '/oauth2/ask' + # A list of role names that should be automatically granted to an OAuth User. The roles will be created if they do not exist + roleNames: [ 'ROLE_USER' ] ``` Once you have an User domain class, initialize this plugin by using the init script `grails init-oauth2 ` @@ -57,7 +59,8 @@ Extensions List of known extension * [Google](https://github.com/grails-plugins/grails-spring-security-oauth2-google) * [Facebook](https://github.com/MatrixCrawler/grails-spring-security-oauth2-facebook) -* [Github] (https://github.com/rpalcolea/grails-spring-security-oauth2-github) +* [Github](https://github.com/rpalcolea/grails-spring-security-oauth2-github) +* [Okta](https://github.com/oktadev/okta-grails-example) How to create a new provider plugin