mirror of
https://github.com/openstf/stf
synced 2025-10-06 03:50:04 +02:00
Support OAuth2 state tokens.
This commit is contained in:
parent
07abb867be
commit
97633327bb
2 changed files with 12 additions and 0 deletions
|
@ -1,5 +1,11 @@
|
||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
## HEAD
|
||||||
|
|
||||||
|
### Enhancements
|
||||||
|
|
||||||
|
- The OAuth2 unit now supports state tokens. Thanks @quangola!
|
||||||
|
|
||||||
## 3.3.1 (2018-07-14)
|
## 3.3.1 (2018-07-14)
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|
|
@ -54,6 +54,11 @@ module.exports.builder = function(yargs) {
|
||||||
, default: process.env.OAUTH_SCOPE
|
, default: process.env.OAUTH_SCOPE
|
||||||
, demand: true
|
, demand: true
|
||||||
})
|
})
|
||||||
|
.option('oauth-state', {
|
||||||
|
describe: 'Whether to enable OAuth 2.0 state token support.'
|
||||||
|
, type: 'boolean'
|
||||||
|
, default: true
|
||||||
|
})
|
||||||
.option('oauth-domain', {
|
.option('oauth-domain', {
|
||||||
describe: 'Optional email domain to allow authentication for.'
|
describe: 'Optional email domain to allow authentication for.'
|
||||||
, type: 'string'
|
, type: 'string'
|
||||||
|
@ -104,6 +109,7 @@ module.exports.handler = function(argv) {
|
||||||
, clientSecret: argv.oauthClientSecret
|
, clientSecret: argv.oauthClientSecret
|
||||||
, callbackURL: argv.oauthCallbackUrl
|
, callbackURL: argv.oauthCallbackUrl
|
||||||
, scope: argv.oauthScope.split(/\s+/)
|
, scope: argv.oauthScope.split(/\s+/)
|
||||||
|
, state: argv.oauthState
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue