blizzard
blizzard copied to clipboard
Error in BlizzClient.TokenValidation
Hi, im sorry to not be able to give more information but i found a strange error:
when using:
validation, _, err := euBlizzClient.TokenValidation(context.Background(), token)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
}
err = e.Encode(validation)
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
i get the following output:
invalid character '<' looking for beginning of value
{
"exp": 0,
"user_name": "",
"authorities": null,
"client_id": "",
"scope": null
}
i can validate the received token myself and use it for other functions like Userinfo just fine, only the validation function seems to have a problem. i am using the following settings:
euBlizzClient, err = blizzard.NewClient(blizzard.Config{
ClientID: clientID,
ClientSecret: clientSecret,
HTTPClient: http.DefaultClient,
Region: blizzard.EU,
Locale: blizzard.DeDE,
while trying to find why this happens, i checked the wow dev documentation, they say:
We strongly recommend that developers use the more secure POST /oauth/check_token method.