Skip to content

Return a 401 error for missing token#1

Open
abarkat99 wants to merge 1 commit intoAzure-Samples:mainfrom
abarkat99:bugfix/return-401-not-403
Open

Return a 401 error for missing token#1
abarkat99 wants to merge 1 commit intoAzure-Samples:mainfrom
abarkat99:bugfix/return-401-not-403

Conversation

@abarkat99
Copy link

This PR updates the get_current_user dependency so that in case of a missing token it returns a 401 response instead of the default 403 response that the HTTPBearer depedency returns.

Made this change because the spec expects a 401 response to be returned which will then cause MCP clients to start the auth flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant