grails-spring-security-core
grails-spring-security-core copied to clipboard
Connect to multiple providers
Hi! Is there a way to connect to multiple OAuth2 providers with this plugin?
I'm creating a sample project to connect to 2 (or more) different OKTA accounts, this is something like what I'm trying to do:
application.yml (inside my grails app):
plugin:
springsecurity:
oauth2:
active: true
registration:
roleNames: ['ROLE_USER']
providers:
okta:
api_key: 'XXXXXXXXX'
api_secret: 'XXXXXXXXX'
userInfoUrl: 'https://dev-XXXXXXXXX.okta.com/oauth2/default/v1/userinfo'
authorizeUrl: 'https://dev-XXXXXXXXX.okta.com/oauth2/default/v1/authorize'
tokenUrl: 'https://dev-XXXXXXXXX.okta.com/oauth2/default/v1/token'
scopes: 'email profile openid'
okta:
api_key: 'YYYYYYYYYY'
api_secret: 'YYYYYYYYYY'
userInfoUrl: 'https://dev-YYYYYYYYYY.okta.com/oauth2/default/v1/userinfo'
authorizeUrl: 'https://dev-YYYYYYYYYY.okta.com/oauth2/default/v1/authorize'
tokenUrl: 'https://dev-YYYYYYYYYY.okta.com/oauth2/default/v1/token'
scopes: 'email profile openid'
Thanks and regards!