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

Token-based authentication, "auto-login" #130

Open
boekhold opened this issue Oct 18, 2016 · 0 comments
Open

Token-based authentication, "auto-login" #130

boekhold opened this issue Oct 18, 2016 · 0 comments

Comments

@boekhold
Copy link

Is there any way to make groovy-wslite attempt an automatic authentication attempt if a request returned UNAUTHORIZED or FORBIDDEN? I'm thinking about logic like:

resp = doRequest()
if (resp.UNAUTHORIZED || resp.FORBIDDEN) {
    authorization.login()
    resp = doRequest()
}

where the HttpAuthorizer implementation has a login() method that makes a login call to the server to obtain a token, and adds that token to the original request.

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

No branches or pull requests

1 participant