Skip to content

Commit

Permalink
Merge pull request #785 from vpoulailleau/patch-2
Browse files Browse the repository at this point in the history
authenticate a superuser
  • Loading branch information
vitalik committed Jul 8, 2023
2 parents 77e38ca + 496ecd7 commit 5c79949
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/docs/guides/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The core concept is that when you describe an API operation, you can define an a

In this example, the client will only be able to call the `pets` method if it uses Django session authentication (the default is cookie based), otherwise an HTTP-401 error will be returned.

If you need to authorize only a superuser, you can use `from ninja.security import django_auth_superuser` instead.

## Automatic OpenAPI schema

Here's an example where the client, in order to authenticate, needs to pass a header:
Expand Down

0 comments on commit 5c79949

Please sign in to comment.