Skip to content
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

GET /api/user no match 403 #2916

Closed
filwaline opened this issue May 1, 2024 · 3 comments
Closed

GET /api/user no match 403 #2916

filwaline opened this issue May 1, 2024 · 3 comments
Assignees
Labels
question Further information is requested

Comments

@filwaline
Copy link
Contributor

Logs:

casdoor-1  | subOwner = built-in, subName = filwaline, method = GET, urlPath = /api/userinfo, obj.Owner = , obj.Name = , result = allow
casdoor-1  | 2024/05/01 07:47:44.420 [I]  (120.231.12.40: ) subOwner = built-in, subName = filwaline, method = GET, urlPath = /api/userinfo, obj.Owner = , obj.Name = , result = allow
casdoor-1  | 2024/05/01 07:47:44.423 [D]  |  120.231.12.40| 200 |   7.161392ms|   match| GET      /api/userinfo   r:/api/userinfo
casdoor-1  | 2024/05/01 07:47:44.543 [D]  |  120.231.12.40| 403 |   3.948479ms| nomatch| GET      /api/get-user
casdoor-1  | subOwner = built-in, subName = filwaline, method = GET, urlPath = /api/get-account, obj.Owner = , obj.Name = , result = allow
casdoor-1  | 2024/05/01 07:47:44.638 [I]  (120.231.12.40: ) subOwner = built-in, subName = filwaline, method = GET, urlPath = /api/get-account, obj.Owner = , obj.Name = , result = allow

The request to /api/get-user received a 403 error. The logs indicate that there is no match. Could this be an issue with the Casbin enforcer?
When a request does not match, it returns nothing like subOwner = built-in, subName = filwaline, method = GET, urlPath = /api/get-account, obj.Owner = , obj.Name = , result = allow. How can I debug this error?

@casbin-bot
Copy link
Contributor

@casbin-bot casbin-bot added the enhancement New feature or request label May 1, 2024
@hsluoyz
Copy link
Member

hsluoyz commented May 1, 2024

@filwaline see docs about how to authenticate the Casdoor API: https://casdoor.org/docs/basic/public-api#how-to-authenticate-with-casdoor-public-api

And, don't mess with the Casdoor built-in Casbin policy, if you don't know how to do it correctly

@hsluoyz hsluoyz closed this as completed May 1, 2024
@hsluoyz hsluoyz added question Further information is requested and removed enhancement New feature or request labels May 1, 2024
@hsluoyz
Copy link
Member

hsluoyz commented May 1, 2024

@filwaline and, don't ask "cheap" questions in this issue list. This issue list is for bug reports, or more complicated questions. Not some place to answer the question that can be figured out in 3 minutes by reading docs. Please go to Discord if you want to ask.

@casdoor casdoor locked as resolved and limited conversation to collaborators May 1, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

3 participants