Role Based Authorization in Asp .Net Core Web API | using Postman | Asp .Net Core Web API Part -5

preview_player
Показать описание
Role-Based Authorization in Asp .Net Core Web API. Role Based Authorization with SQL Identity Tables in Asp.Net Core Web API. Create User and Admin Roles in SQL Database. Generate Role-Based bearer token and Authorize a .Net Core Web API.

Create ASP.NET Core Identity SQL Database Asp Dot Net Core Web API

User Registration Asp .Net Core Web API

Login Asp .Net Core Web API

#Authorization #AuthorizationCoreWebAPI
Рекомендации по теме
Комментарии
Автор

Fixed this now. The configure method has to have the follow in the correct order.. I do think you needed to have mentioned this in your videos.

app.UseAuthentication();
app.UseRouting();
app.UseAuthorization();

app.UseEndpoints(endpoints =>
{
endpoints.MapControllers();
});

ahmedmulla
Автор

Thanks for Can you share a complete video implementing the refresh token as

mohanchandra
Автор

I get error for the line
if (!await
await roleManager.CreateAsync(new
if (!await
await roleManager.CreateAsync(new
if (!await
{
await userManager.AddToRolesAsync(user, UserRoles.Admin);
}
saying
cannot convert from to could u pls explain the possible cause?

SMRITIK
Автор

sir 14:33
i get error this line pls solve this
if (!await
await roleManager.CreateAsync(new
if (!await
await roleManager.CreateAsync(new
if (!await
{
await userManager.AddToRolesAsync(user, UserRoles.Admin);
}

Sgr_
Автор

I followed this video and the earlier ones. I can get the Token by login method but When I paste the token into PostMan I still get 401 Unauthorized error. What I'm I missing. It looks the weatherforecast controller is not even going through the authorize methods

ahmedmulla
Автор

could you pass the source code please?

oscarencarnacionliz
Автор

Hi everyone can you please look into, I am not able to register getting this error Unable to resolve service for type

JitendraJayswal-gfie
Автор

IN MY REGISTRATION MODEL TAKE 7 FIELDS HOW TO DATA PASS PLEASE ANY ONE TELL IN POSTMAN I GOT status :fail

pratibhagunupuram
Автор

Can you share the source code? Because some parts of the videos do not show the codes. Please return.

mertgundogdu