-
-
Notifications
You must be signed in to change notification settings - Fork 959
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
client api Whoami not work with Header Authorization
#1215
Comments
Thank you for contributing to this repository by creating an issue! Unfortunately, your issue lacks vital information, such as log files, the error message, the software version, your configuration or other pieces of the puzzle. Please also ensure that your issue is appropriately formatted. If you do not know how to write markdown, you can find help here. Helping you with your problem is only possible if you share this information, and it will save a lot of time of back and forth on your as well as our end! For this reason, this repository uses issue templates which you can select when pressing "New issue". Please use one of those issue templates to fill in the required information. You can either create a new issue for this purpose and close this one, or leave a comment.
If you do not provide the requested information, this issue will be closed. |
Describe the bug
In api If it's client bug then in here https:/ory/kratos-client-go/blob/eac42ac8684469e5cf19a75b6ea374d0a6a267f8/client/public/whoami_parameters.go#L157 If it's kratos bug, bug in here: kratos/session/manager_http.go Line 98 in 83aedcb
Reproducing the bug
Expected behavior I can get a valid session |
I'm using go client, don't know if the above pull fixes that.
here's the source code in if o.Authorization != nil {
// query param Authorization
var qrAuthorization string
if o.Authorization != nil {
qrAuthorization = *o.Authorization
}
qAuthorization := qrAuthorization
if qAuthorization != "" {
if err := r.SetQueryParam("Authorization", qAuthorization); err != nil {
return err
}
}
} but query param is not used in func bearerTokenFromRequest(r *http.Request) (string, bool) {
parts := strings.Split(r.Header.Get("Authorization"), " ")
if len(parts) == 2 && strings.ToLower(parts[0]) == "bearer" {
return parts[1], true
}
return "", false
} |
@aeneasr any release for this fix? |
Hi team,
Whoami not support query authorization, but code generate with query.
No any Header
Authorization
is setBug in here
kratos/internal/httpclient/client/public/whoami_parameters.go
Line 156 in 95b3376
Please hotfix it thanks.
The text was updated successfully, but these errors were encountered: