Sort Ordering Usings and Add Support for User ID in OpenActions ...
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
using System;
|
||||
using IdentityModel;
|
||||
using xIds.Interfaces;
|
||||
using System.Threading;
|
||||
using xCommons.Constants;
|
||||
using xCommons.Extensions;
|
||||
using xExceptions.Constants;
|
||||
using System.Security.Claims;
|
||||
@@ -11,12 +9,10 @@ using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using xIdentityModels.Constants;
|
||||
using xIdentityService.Constants;
|
||||
using System.Collections.Generic;
|
||||
using xIdentityModels.Extensions;
|
||||
using Microsoft.AspNetCore.Mvc.Filters;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using xIdentityModels.Dtos;
|
||||
using xIdentityService.Extensions;
|
||||
|
||||
namespace xIds.Providers
|
||||
{
|
||||
@@ -142,29 +138,7 @@ namespace xIds.Providers
|
||||
|
||||
//
|
||||
// Creating Claims ...
|
||||
var claims = new List<Claim> {
|
||||
//
|
||||
// Owner Identifier of API Key ...
|
||||
new(ClaimTypes.Name, validationResult.OwnerId),
|
||||
new(JwtClaimTypes.Subject, validationResult.OwnerId),
|
||||
//
|
||||
// Application Id ...
|
||||
new(XCustomClaims.ApplicationId, validationResult.ApplicationId.ToString()),
|
||||
//
|
||||
// Authentication Type ...
|
||||
new(XCustomClaims.AuthType, apiKeyAuthentication),
|
||||
};
|
||||
|
||||
//
|
||||
// Add Scopes ...
|
||||
if (validationResult.Scopes != null)
|
||||
{
|
||||
//
|
||||
foreach (var scope in validationResult.Scopes)
|
||||
{
|
||||
claims.Add(new Claim(JwtClaimTypes.Scope, scope));
|
||||
}
|
||||
}
|
||||
var claims = validationResult.ToXClaims();
|
||||
|
||||
//
|
||||
// Create Principal and Ticket ...
|
||||
|
||||
Reference in New Issue
Block a user