-
Notifications
You must be signed in to change notification settings - Fork 216
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
Cannot set Authorization via extraHeaders #1700
Comments
I guess the protection is because of this code before: if (basicAuth !== undefined) {
headers["Authorization"] = "Basic " + basicAuth;
}
or
if (token) {
logger.debug("token passed, setting Authorization header");
headers["Authorization"] = "Bearer " + token;
} I think we can allow "Authorization" unless its already part of the headers... |
Allowing |
Does this work for you? #1702 |
What is your call stack? Are you using this library as an SDK? If so, we can simply add an addiotional parameter to set the token directly... |
I am using it via the
I am currently able to get the code from I should note that I have confirmed that calling my |
Can you provide the call stack you are using? As you said "only basicAuth" i guess the last call is |
Ok, as you said in the beginning this is a very strange IdP behavior. I do not think we should all the way down here a token parameter. The extra header trick must be good enough. Can you try my prepared MR if that works for you? |
I have grabbed the code 75cd882 and given it a try, it does seem to indeed work. I am now able to get back the bearer token from the API. |
I am trying to authenticate against a 3rd party system and that requires setting a bearer token on the /token endpoint. (seems odd to me, but I cant change it)
I tried setting this via extraHeaders unfortunately this is not working.
I have checked the code and it seems this has explicitly been blocked.
I don't suppose this can be allowed?
The text was updated successfully, but these errors were encountered: