11Spring Security OAuth2 OIDC Plugin
22====================================
3- [ ![ Download] ( https://api.bintray.com/packages/grails/plugins/spring-security-oauth2-google /images/download.svg ) ] ( https://bintray.com/grails/plugins/spring-security-oauth2-google/_latestVersion )
3+ [ ![ Download] ( https://api.bintray.com/packages/grails/plugins/spring-security-oauth2-oidc /images/download.svg ) ] ( https://bintray.com/grails/plugins/spring-security-oauth2-google/_latestVersion )
44
5- Add aa OIDC OAuth2 provider to the [ Spring Security OAuth2 Plugin] ( https://github.com/apache/grails- /grails-spring-security-oauth2 ) .
5+ Add aa OIDC OAuth2 provider to the [ Spring Security OAuth2 Plugin] ( https://github.com/apache/grails/grails-spring-security-oauth2 ) .
66
77Installation
88------------
@@ -19,7 +19,7 @@ dependencies {
1919Usage
2020-----
2121Add this to your application.yml
22- ```
22+ ``` yaml
2323grails :
2424 plugin :
2525 springsecurity :
@@ -28,20 +28,20 @@ grails:
2828 oidc :
2929 api_key : ' oidc-api-key' # needed
3030 api_secret : ' oidc-api-secret' # needed
31- successUri: "/oauth2/google /success" #optional
32- failureUri: "/oauth2/google /failure" #optional
33- callback: "/oauth2/google /callback" #optional
34- scopes: "some_scope" #optional, see https://developers.google.com/identity/protocols/googlescopes#monitoringv3
31+ successUri : " /oauth2/oidc /success" # optional
32+ failureUri : " /oauth2/oidc /failure" # optional
33+ callback : " /oauth2/oidc /callback" # optional
34+ scopes : " some_scope" # optional (Default: openid profile email)
3535` ` `
3636You can replace the URIs with your own controller implementation.
3737
3838In 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:
39- ``` xml
40- <oauth2 : connect provider =" google " id =" google -connect-link" >Google </oauth2 : connect >
39+ ` ` ` html
40+ <oauth2:connect provider="oidc " id="oidc -connect-link">OIDC Provider </oauth2:connect>
4141
42- Logged with google ?
43- <oauth2 : ifLoggedInWith provider =" google " >yes</oauth2 : ifLoggedInWith >
44- <oauth2 : ifNotLoggedInWith provider =" google " >no</oauth2 : ifNotLoggedInWith >
42+ Logged with OIDC ?
43+ <oauth2:ifLoggedInWith provider="oidc ">yes</oauth2:ifLoggedInWith>
44+ <oauth2:ifNotLoggedInWith provider="oidc ">no</oauth2:ifNotLoggedInWith>
4545```
4646License
4747-------
0 commit comments