up
This commit is contained in:
1 parent
f622fbcf0a
commit
9ef06db411
69 files changed
+5421
-6426
No files matched your search
@@ -0,0 +1,19 @@
|
||||
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
|
||||
using Microsoft.Extensions.Options;
|
||||
|
||||
namespace decePubClient.Services
|
||||
{
|
||||
public class ApiAuthorizationOptionsConfiguration : IPostConfigureOptions<RemoteAuthenticationOptions<ApiAuthorizationProviderOptions>>
|
||||
{
|
||||
public void Configure(RemoteAuthenticationOptions<ApiAuthorizationProviderOptions> options)
|
||||
{
|
||||
options.UserOptions.RoleClaim ??= "role";
|
||||
}
|
||||
|
||||
public void PostConfigure(string name, RemoteAuthenticationOptions<ApiAuthorizationProviderOptions> options)
|
||||
{
|
||||
if (string.Equals(name, Options.DefaultName))
|
||||
Configure(options);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user