Authority url validator
This commit is contained in:
parent
5480df4cfb
commit
1180d518a2
9 changed files with 103 additions and 16 deletions
|
@ -141,7 +141,7 @@ public static class IdentityServiceExtensions
|
|||
|
||||
options.Events = new JwtBearerEvents
|
||||
{
|
||||
OnMessageReceived = SetTokenFromQuery
|
||||
OnMessageReceived = SetTokenFromQuery,
|
||||
};
|
||||
});
|
||||
|
||||
|
@ -164,8 +164,12 @@ public static class IdentityServiceExtensions
|
|||
if (ctx.Principal == null) return;
|
||||
|
||||
var user = await oidcService.LoginOrCreate(ctx.Principal);
|
||||
if (user == null) return;
|
||||
|
||||
if (user == null)
|
||||
{
|
||||
ctx.Principal = null;
|
||||
await ctx.HttpContext.SignOutAsync(OpenIdConnect);
|
||||
return;
|
||||
}
|
||||
|
||||
var claims = new List<Claim>
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue