last ...
This commit is contained in:
@@ -25,9 +25,7 @@ using xIdentityModels.Configurations;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.AspNetCore.Authentication;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using xIdentityService.Constants;
|
||||
|
||||
namespace xIds.DI
|
||||
{
|
||||
@@ -412,49 +410,6 @@ namespace xIds.DI
|
||||
// Create Authentication Builder ...
|
||||
var authBuilder = services.AddAuthentication();
|
||||
|
||||
//
|
||||
// Create Authentication Builder ...
|
||||
// var authBuilder = services.AddAuthentication(options =>
|
||||
// {
|
||||
// //
|
||||
// // Setting Default Authentication Schema ...
|
||||
// // For Handling Smart Schema Forwarder ...
|
||||
// options.DefaultScheme = XAuthentication.SMART_SCHEME;
|
||||
// options.DefaultChallengeScheme = XAuthentication.SMART_SCHEME;
|
||||
// options.DefaultAuthenticateScheme = XAuthentication.SMART_SCHEME;
|
||||
// })
|
||||
// .AddPolicyScheme(
|
||||
// displayName: XAuthentication.SMART_SCHEME,
|
||||
// authenticationScheme: XAuthentication.SMART_SCHEME,
|
||||
// configureOptions: options =>
|
||||
// {
|
||||
// //
|
||||
// // Configure Forward Default Selector ...
|
||||
// options.ForwardDefaultSelector = context =>
|
||||
// {
|
||||
// //
|
||||
// // Retrieve XApiKey Header Key ...
|
||||
// var apiKeyHeader = XHeader.ApiKey.GetStringValue();
|
||||
|
||||
// //
|
||||
// // If Header Contains Key ...
|
||||
// if (context.Request.Headers.ContainsKey(apiKeyHeader))
|
||||
// {
|
||||
// return XAuthenticationScheme.XApiKey.GetStringValue();
|
||||
// }
|
||||
|
||||
// //
|
||||
// // If not ...
|
||||
// return XAuthentication.IDENTITY_SERVER_LOCAL_API;
|
||||
// };
|
||||
// }
|
||||
// );
|
||||
|
||||
//
|
||||
// authBuilder.AddScheme<AuthenticationSchemeOptions, XApiKeyAuthenticationHandler>(
|
||||
// XAuthenticationScheme.XApiKey.GetStringValue(),
|
||||
// options => { });
|
||||
|
||||
//
|
||||
// Add JwtBearer by Smart Schema ForwardDefaultSelector ...
|
||||
authBuilder.AddJwtBearer(options =>
|
||||
|
||||
Reference in New Issue
Block a user