Skip to content

Add custom_auth option to Client constructor#48

Merged
tagomoris merged 5 commits intotagomoris:masterfrom
MrOrz:custom-auth
May 12, 2021
Merged

Add custom_auth option to Client constructor#48
tagomoris merged 5 commits intotagomoris:masterfrom
MrOrz:custom-auth

Conversation

@MrOrz
Copy link
Contributor

@MrOrz MrOrz commented May 11, 2021

Add custom_auth string argument to Client constructor so that developers can customize their HTTP Authorization header string, enabling customized authentication process such as Kerberos, OpenID Connect, etc.

Developers must prepare their own Authorization, though.

Fixes #47.

@MrOrz MrOrz changed the title Add custom_auth arg Add custom_auth to Client constructor May 11, 2021
@MrOrz MrOrz changed the title Add custom_auth to Client constructor Add custom_auth option to Client constructor May 11, 2021
@MrOrz MrOrz requested a review from tagomoris May 12, 2021 03:12
@tagomoris tagomoris merged commit e1c4556 into tagomoris:master May 12, 2021
@tagomoris
Copy link
Owner

Shipped as v0.11.0 https://www.npmjs.com/package/presto-client/v/0.11.0
Thank you!

if (args.custom_auth) {
this.authorization = args.custom_auth;
} else if (args.basic_auth) {
this.authorization = 'Basic ' + new Buffer(client.basic_auth.user + ':' + client.basic_auth.password).toString('base64');

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

regression #51

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Discussion: support kerberos authentication

3 participants