Skip to content
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

Authentication options #47

Open
RicardoSR opened this issue Aug 11, 2022 · 4 comments
Open

Authentication options #47

RicardoSR opened this issue Aug 11, 2022 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@RicardoSR
Copy link

On my company we had some private azure feeds where credentials are deactivated and only PAT's are accepted. Event when its possible add the PAT as password on code try to add the user

if (authOption.authType == AuthorizationType[AuthorizationType.basicAuth]) {
var bytes = utf8.encode(authOption.username + ":" + authOption.password);
var encoded = base64.encode(bytes);
requestOption.headers['Authorization'] = 'Basic ' + encoded;
}

maybe add on more authenthication type like "PAT" can help

if (authOption.authType == AuthorizationType[AuthorizationType.patAuth) {
var bytes = utf8.encode(authOption.password);
var encoded = base64.encode(bytes);
requestOption.headers['Authorization'] = 'Basic ' + encoded;
}

or expected directly the pat in base64

if (authOption.authType == AuthorizationType[AuthorizationType.patAuth) {
requestOption.headers['Authorization'] = 'Basic ' + authOption.password;
}

@RicardoSR
Copy link
Author

correction to the first proposal

if (authOption.authType == AuthorizationType[AuthorizationType.patAuth) {
var bytes = utf8.encode(":" + authOption.password);
var encoded = base64.encode(bytes);
requestOption.headers['Authorization'] = 'Basic ' + encoded;
}

@aliasadidev
Copy link
Owner

sounds good, i will integrate it

@aliasadidev aliasadidev self-assigned this Aug 17, 2022
@aliasadidev aliasadidev added the enhancement New feature or request label Aug 17, 2022
@Grrison
Copy link

Grrison commented Jun 27, 2023

just would like to know whether this has been implemented in the latest release? If not, any plan on this? thank you.

@andyqp
Copy link

andyqp commented Feb 22, 2024

I've had success with PAT authentication for the local Azure DevOps Server (could work for the service as well). I have used basicAuth with VssSessionToken as the username and plaintext PAT as the password.

Make sure that the PAT has the "Packaging (Read)" assigned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants