DEV Community

loading...

Discussion on: Developing token authentication using ASP.NET Core

Collapse
warren_pearson profile image
Warren Pearson

When a request arrives with a valid token in the header, how should the end point determine which user the token is associated with?

Collapse
samueleresca profile image
Samuele Resca Author

The token contains all the necessary informations. For example, you can see token infos here: (jwt.io/)[https://jwt.io/]

eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJURVNUIiwianRpIjoiZTI2NGQ3NzktZTg2Ni00NGVlLThjOTUtZmI5YTA3NjNhM2ViIiwiaWF0IjoxNTI0NTIzNjY2LCJuYmYiOjE1MjQ1MjM2NjYsImV4cCI6MTUyNDUyMzk2NiwiaXNzIjoiRGVtb0lzc3VlciIsImF1ZCI6IkRlbW9BdWRpZW5jZSJ9.SORiDZO7kohrJ-Ew_hsTtJ5r9Zqn1RN9sjSTJni7MDo

Forem Open with the Forem app