Skip to content

Commit

Permalink
fix: middleware example from edgy to jwt.md (#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
DJWOMS authored Nov 5, 2024
1 parent 21957dd commit 5b144a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions docs/en/docs/configurations/jwt.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ To use the JWTConfig with a middleware.
```

!!! info
The example uses a supported [JWTAuthMiddleware](../databases/saffier/middleware.md#jwtauthmiddleware)
from Esmerald with Saffier ORM.
The example uses a supported [JWTAuthMiddleware](../databases/edgy/middleware.md#jwtauthmiddleware)
from Esmerald with Edgy ORM.

## Parameters

Expand Down Expand Up @@ -179,9 +179,9 @@ in dictating which type of token is being validated and sent.

The `access_token` is sent via `headers` **as it should** and the `refresh_token` is sent via `POST`.

#### The views
#### The controllers

Now it is time to assemble everything in the views where we will have:
Now it is time to assemble everything in the controllers where we will have:

* `/auth/create` - Endpoint to create the users.
* `/auth/signin` - Login endpoint for the user.
Expand Down
2 changes: 1 addition & 1 deletion docs_src/configurations/jwt/claims/middleware.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from jose import JWSError, JWTError

from esmerald.conf import settings
from esmerald.contrib.auth.mongoz.middleware import JWTAuthMiddleware as EsmeraldMiddleware
from esmerald.contrib.auth.edgy.middleware import JWTAuthMiddleware as EsmeraldMiddleware
from esmerald.exceptions import AuthenticationError, NotAuthorized
from esmerald.middleware.authentication import AuthResult
from esmerald.security.jwt.token import Token
Expand Down
2 changes: 1 addition & 1 deletion docs_src/configurations/jwt/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from esmerald import EsmeraldAPISettings
from esmerald.config.jwt import JWTConfig
from esmerald.contrib.auth.saffier.middleware import JWTAuthMiddleware
from esmerald.contrib.auth.edgy.middleware import JWTAuthMiddleware
from lilya._internal._module_loading import import_string
from lilya.middleware import DefineMiddleware as LilyaMiddleware

Expand Down

0 comments on commit 5b144a1

Please sign in to comment.