Closed DenisBytes closed 1 month ago
@tangyang9464 @JalinWang @imp2002
@DenisBytes what do you pass? What got and what to expect?
The full text. "admin/07ed1609-80e0-4dac-8a2c-e2dbbbac85c3" but instead it just requires. "07ed1609-80e0-4dac-8a2c-e2dbbbac85c3".
As i said it's just a suggestion not really an issue.
Just add documentation
No much need to add docs, all APIs are like that. People need to adapt themselves to use Casdoor SDK. Need to think in "the Casdoor way"
Version: v0.47.0
This is not really an issue but more of a suggestion.
When calling the method:
casdoorsdk.GetToken(name string)
it requires the JWT ID (ex. of a JWT ID, "admin/07ed1609-80e0-4dac-8a2c-e2dbbbac85c3")
But if you pass the full string just like the example it returns:
"invalid character '<' looking for beginning of value"
Looking into the method definition i found why it gave an error:
Is that the method does the formatting itself. I haven't tried other the GetX methods but i suppose they do it where needed.
Quick Solution is to use the path.Base() standard library method:
But it's better if there's documentation above the method