TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Rupinder Singh
NA
26
9.5k
JWT Authentication in Razor Pages .net core
Feb 1 2021 2:44 AM
Hi,
I am big fan of your. Love you site and content. I need your help, with one of my project.
Thank you very much for being so active for c# community.
I have a website in Razor pages, but now i am planning to have a Web API also, so that i can use it as business layer/Data Layer for Mobile app and Blazor too.
Now, as per your post, i can implement an API with JWT Authentication and will be using Roles in it also. Now my concern is, how i can implement the JWT Authentication in Razor Pages. Like i will log into Razor pages app and will call Web API from razor pages and API will return a JWT Authentication token. I want to use that JWT in Razor Pages for authorization and want to use attribute [Authorize(Role = "role")] in razor pages. Is this possible, if yet can you please create a post on this.
Thanks,
Rupinder
Reply
Answers (
3
)
I am unable to call ajax method
How to use IHttpClientFactory or HttpClient to call multiple API's?