This is part 4 of this series, where I implement JWT authentication using the Axum framework in Rust.

The previous part is here.

Source Code

The repository is here

Quick Recap

In the previous chapter we added database and JWT configurations. We created an application context, which is initialised once and shared throughout the application.

Introduction

In this chapter we will see how to create middlewares in Axum using Tower. The middlewares here will be used for authentication purposes. We will use the argon2 crate added in the previous section to hash passwords; the jsonwebtoken crate will provide methods to sign and verify tokens.

##…

Similar Posts

Loading similar posts...

Keyboard Shortcuts

Navigation
Next / previous item
j/k
Open post
oorEnter
Preview post
v
Post Actions
Love post
a
Like post
l
Dislike post
d
Undo reaction
u
Recommendations
Add interest / feed
Enter
Not interested
x
Go to
Home
gh
Interests
gi
Feeds
gf
Likes
gl
History
gy
Changelog
gc
Settings
gs
Browse
gb
Search
/
General
Show this help
?
Submit feedback
!
Close modal / unfocus
Esc

Press ? anytime to show this help