Skip to content

Commit

Permalink
feat(auth): OAuth2 access_token in GET query string in userInfoURL (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
triszt4n committed Apr 17, 2022
1 parent a647626 commit de15103
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion server/modules/authentication/oauth2/authentication.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ module.exports = {
})

client.userProfile = function (accesstoken, done) {
this._oauth2._useAuthorizationHeaderForGET = true
this._oauth2._useAuthorizationHeaderForGET = !conf.useQueryStringForAccessToken
this._oauth2.get(conf.userInfoURL, accesstoken, (err, data) => {
if (err) {
return done(err)
Expand Down
6 changes: 6 additions & 0 deletions server/modules/authentication/oauth2/definition.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,3 +64,9 @@ props:
title: Scope
hint: (optional) Application Client permission scopes.
order: 10
useQueryStringForAccessToken:
type: Boolean
default: false
title: Pass access token via GET query string to User Info Endpoint
hint: (optional) Pass the access token in an `access_token` parameter attached to the GET query string of the User Info Endpoint URL. Otherwise the access token will be passed in the Authorization header.
order: 11

0 comments on commit de15103

Please sign in to comment.