mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-29 11:54:27 +01:00
Prepare Startup.cs for netcoreapp30
This commit is contained in:
@@ -211,6 +211,8 @@
|
||||
<Content Update="Views\Wallets\WalletTransactions.cshtml">
|
||||
<Pack>$(IncludeRazorContentInPack)</Pack>
|
||||
</Content>
|
||||
<Content Remove="Views\Server\EditGoogleCloudStorageStorageProvider.cshtml" Condition="'$(TargetFramework)' != 'netcoreapp2.1'">
|
||||
</Content>
|
||||
<Content Update="Views\Wallets\_Nav.cshtml">
|
||||
<Pack>$(IncludeRazorContentInPack)</Pack>
|
||||
</Content>
|
||||
|
||||
@@ -198,7 +198,9 @@ namespace BTCPayServer.Hosting
|
||||
options.AllowPasswordFlow();
|
||||
options.AllowAuthorizationCodeFlow();
|
||||
options.UseRollingTokens();
|
||||
#if NETCOREAPP21
|
||||
options.UseJsonWebTokens();
|
||||
#endif
|
||||
|
||||
options.RegisterScopes(
|
||||
OpenIdConnectConstants.Scopes.OpenId,
|
||||
@@ -212,13 +214,19 @@ namespace BTCPayServer.Hosting
|
||||
RestAPIPolicies.BTCPayScopes.ViewApps,
|
||||
RestAPIPolicies.BTCPayScopes.AppManagement
|
||||
);
|
||||
|
||||
#if NETCOREAPP21
|
||||
options.AddEventHandler<PasswordGrantTypeEventHandler>();
|
||||
options.AddEventHandler<AuthorizationCodeGrantTypeEventHandler>();
|
||||
options.AddEventHandler<RefreshTokenGrantTypeEventHandler>();
|
||||
options.AddEventHandler<ClientCredentialsGrantTypeEventHandler>();
|
||||
options.AddEventHandler<LogoutEventHandler>();
|
||||
|
||||
#else
|
||||
options.AddEventHandler(PasswordGrantTypeEventHandler.Descriptor);
|
||||
options.AddEventHandler(AuthorizationCodeGrantTypeEventHandler.Descriptor);
|
||||
options.AddEventHandler(RefreshTokenGrantTypeEventHandler.Descriptor);
|
||||
options.AddEventHandler(ClientCredentialsGrantTypeEventHandler.Descriptor);
|
||||
options.AddEventHandler(LogoutEventHandler.Descriptor);
|
||||
#endif
|
||||
options.ConfigureSigningKey(Configuration);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user