From 956e3349fe77618a1579482b0b2a464acf7a03e5 Mon Sep 17 00:00:00 2001
From: falcon <9504402@qq.com>
Date: Tue, 3 Jan 2023 09:58:11 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E4=BB=A3=E7=A0=81=E6=A0=BC?=
=?UTF-8?q?=E5=BC=8F?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../FalconClaim/IServiceCollectionExtend.cs | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/Falcon.SugarApi/FalconClaim/IServiceCollectionExtend.cs b/Falcon.SugarApi/FalconClaim/IServiceCollectionExtend.cs
index 12472c0..3d3d75b 100644
--- a/Falcon.SugarApi/FalconClaim/IServiceCollectionExtend.cs
+++ b/Falcon.SugarApi/FalconClaim/IServiceCollectionExtend.cs
@@ -3,7 +3,6 @@ using Falcon.SugarApi.JsonSerialize;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using System;
-using System.Text.Json;
namespace Falcon.SugarApi.FalconClaim
{
@@ -13,19 +12,20 @@ namespace Falcon.SugarApi.FalconClaim
public static class IServiceCollectionExtend
{
///
- /// 增加FalconCalom相关服务
+ /// 增加FalconClaim相关服务
///
- public static IServiceCollection AddFalconClaim(this IServiceCollection services,Action? optionBuilder = null) {
- optionBuilder?.Invoke(new FalconClaimOption());
+ public static IServiceCollection AddFalconClaim(this IServiceCollection services, Action? optionBuilder = null) {
+ var option = new FalconClaimOption();
+ optionBuilder?.Invoke(option);
services.TryAddSingleton();
- services.TryAddSingleton();
+ services.TryAddSingleton();
services.TryAddSingleton();
- services.TryAddSingleton();
+ services.TryAddSingleton();
services.AddAuthentication(b => {
b.DefaultAuthenticateScheme = FalconClaimOption.SchemeName;
b.DefaultChallengeScheme = FalconClaimOption.SchemeName;
b.DefaultForbidScheme = FalconClaimOption.SchemeName;
- b.AddScheme(FalconClaimOption.SchemeName,FalconClaimOption.SchemeName);
+ b.AddScheme(FalconClaimOption.SchemeName, FalconClaimOption.SchemeName);
});
return services;
}