red-machine-69654
02/16/2023, 5:11 PMclient.V0alpha2Api.ToSession(o.ctx, ...)
red-machine-69654
02/16/2023, 5:20 PMreq, err := http.NewRequestWithContext(o.ctx, http.MethodGet, fmt.Sprintf("%s/sessions/whoami"), nil)
if err != nil {
return nil, err
}
req.Header.Set("Authorization", fmt.Sprintf("bearer %s", token))
res, err := <http://http.DefaultClient.Do|http.DefaultClient.Do>(req)
if err != nil {
return nil, err
}
But is there a way to use the sdk?magnificent-energy-493
.toSession({ cookie: req.header("cookie") })
or are you not using cookie?red-machine-69654
02/16/2023, 5:36 PMred-machine-69654
02/16/2023, 5:36 PMred-machine-69654
02/16/2023, 5:37 PMX-Username: foo
.
I forgot about this part before I went down the rabbithole.
And now I am actually trying to look up the user based on username.red-machine-69654
02/16/2023, 5:38 PMmagnificent-energy-493
magnificent-energy-493
red-machine-69654
02/16/2023, 5:44 PMred-machine-69654
02/16/2023, 5:46 PMred-machine-69654
02/16/2023, 5:46 PMred-machine-69654
02/16/2023, 5:47 PMcurved-fountain-46946
02/16/2023, 7:34 PMAPIClient.IdentityApi.ListIdentities
🙂red-machine-69654
02/16/2023, 7:57 PMred-machine-69654
02/16/2023, 7:57 PM