refactor(DIExtensions): Methode AddJwtSignatureHandler hinzugefügt
This commit is contained in:
parent
8ccf6f31ae
commit
8850ac4ac9
@ -60,5 +60,9 @@ namespace DigitalData.Core.Security
|
||||
|
||||
return services.AddSingleton(sp => Options.Create(descriptor));
|
||||
}
|
||||
|
||||
public static IServiceCollection AddJwtSignatureHandler<TPrincipal>(this IServiceCollection services, Func<TPrincipal, IDictionary<string, object>>? claimsMapper = null, Func<TPrincipal, ClaimsIdentity>? subjectMapper = null) => services
|
||||
.AddClaimDescriptor(claimsMapper: claimsMapper, subjectMapper: subjectMapper)
|
||||
.AddSingleton<IJwtSignatureHandler<TPrincipal>, JwtSignatureHandler<TPrincipal>>();
|
||||
}
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user