-
Notifications
You must be signed in to change notification settings - Fork 76
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
Bearer auth scheme is lowercase in request header #2109
Comments
This can be worked around in the TypeSpec by using
instead of |
I notice that this is introduced by
@timotheeguerin could we fix in typespec http lib? |
According to the RFC:
We should fix in tsp. |
The value in openapi also is lower case so I think this should be the emitter understanding the known values Swagger ui understand all cases and sends We have just kept the authentication inline with openapi3. We should discuss if we want to change and or clarify the intent of that value it but this is not a bug in typespec http right now. |
Looks like |
Laurrent has a pr for this and I have a small concern so commented here microsoft/typespec#2639 (comment). |
pending on this issue microsoft/typespec#2672 |
When making a request to the OpenAI API using the unbranded SDK with this code, authorization fails:
Expected behavior
With a valid API key, authorization succeeds because the
Authorization
header has valueBearer <access-token>
.Actual behavior
Authorization fails due to the word "bearer" being lower case in the request:
Authorization: bearer <access-token>
.The text was updated successfully, but these errors were encountered: