Looks like this is not the case all the time. In my case, I am observing that even though organization name is built-in, owner name of the token is admin.
As a result, GetToken is sending wrong id to Casdoor server.
Attaching a sample response of get-token API that explains that ower value can be different from organization name.
Another weird thing I am observing in get-token API is that even if wrong ID is sent, no error is returned from API. Instead response code is 200 with following json payload:
Get token API of Casdoor accept
id
in the query parameter. ID is combination of owner and name of the token as documented here. https://door.casdoor.com/swagger/#/Token%20API/ApiController.GetTokenHowever in GetToken implementation of this SDK, it is assumed that Organization is the owner https://github.com/casdoor/casdoor-go-sdk/blob/master/casdoorsdk/token.go#L87
Looks like this is not the case all the time. In my case, I am observing that even though organization name is
built-in
, owner name of the token isadmin
.As a result, GetToken is sending wrong id to Casdoor server.
Attaching a sample response of get-token API that explains that ower value can be different from organization name.
Another weird thing I am observing in
get-token
API is that even if wrong ID is sent, no error is returned from API. Instead response code is 200 with following json payload: