-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
JWT auth support #360
base: main
Are you sure you want to change the base?
JWT auth support #360
Conversation
Quality Gate passedIssues Measures |
It should increase once the related tests are enabled. |
...this.defaultHeaders, | ||
Authorization: `Basic ${Buffer.from(`${params.auth.username}:${params.auth.password}`).toString('base64')}`, | ||
} | ||
} else { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optional: can we move Auth header
calculation logic to a separate function and test separately? It's hard to reason about the flow with a few levels of if
if (isJWTAuth(params?.auth)) {...}
if (this.params.set_basic_auth_header) {
if (isCredentialsAuth(params?.auth)) { ... }
else {...}
}
Summary
username
andpassword
options in the config are now deprecated; theauth
object should be used instead.access_token
param.The URL config example needs to be updated - maybe later as a follow-up.
Checklist