hi
Im not sure, It will be best if you can share a simple project. : )
hi
Can you share a simple project? liming.ma@volosoft.com
hi
How can I map user which is authenticated by external sso and our admin api, we have to match the users with email and set currentuser for permission management.
Im not understand very well, You can add some related code in your simple project.
hi
Can you share a simple project? liming.ma@volosoft.com
I will download and check it.
hi
https://learn.microsoft.com/en-us/aspnet/core/security/authorization/limitingidentitybyscheme?view=aspnetcore-7.0#use-multiple-authentication-schemes
hi
You can call this code on controllers or Authorize with a specific scheme in ASP.NET Core
https://learn.microsoft.com/en-us/aspnet/core/security/authorization/limitingidentitybyscheme?view=aspnetcore-7.0
Yes, You can add multiple scheme
context.Services.AddAuthentication(JwtBearerDefaults.AuthenticationScheme)
.AddJwtBearer(options =>
{
options.Authority = configuration["AuthServer:Authority"];
options.RequireHttpsMetadata = Convert.ToBoolean(configuration["AuthServer:RequireHttpsMetadata"]);
options.Audience = "Test1";
}).AddJwtBearer("your_jwt_schema", options =>
{
options...
})
hi
The external login is only available on MVC side. Doesn't support angular.
You can consider using code flow then you will be redirected to MVC login page.
hi
You can add a jwt authentication scheme by AddJwtBearer("your_jwt_schema", ...) and call the AuthenticateAsync of httpcontext
var result = await httpContext.AuthenticateAsync("your_jwt_schema");
if (result.Succeeded && result.Principal != null)
{
ctx.User = result.Principal;
}
Yes, You can use the NullEmailSender.