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

Authenticate once #43

Open
osher opened this issue Jun 28, 2017 · 2 comments
Open

Authenticate once #43

osher opened this issue Jun 28, 2017 · 2 comments
Labels

Comments

@osher
Copy link

osher commented Jun 28, 2017

Is there a way to authenticate once and use a session-token instead of sending creds in plain text for every request?

I would expect it to implement an .authenticate(user,pwd, callback(err, token)) method, and work with a session-token instead of sending creds in plain text...

Maybe there is?

I did see I can inject whatever headers to each request. Is that what you mean users to hook on?
In that case - is there a method that just authenticates and provides valid cookie / token / auth header?

@silas
Copy link
Owner

silas commented Jun 29, 2017

You can just pass in the username/token fields the same way you pass in the username/password fields. I don't know if Jenkins has an API for generating tokens. If you find one I'm not against implementing it, but I haven't run across it yet.

@silas silas added the question label Mar 21, 2019
@Domuska
Copy link

Domuska commented Apr 5, 2019

I've also looked at this issue and not really found out if Jenkins supports that kind of token-based authentication. You can get the indefinitely living API token from Jenkins' UI or fetch it programmatically as explained here, but that's hacky at best.

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

No branches or pull requests

3 participants