diff --git a/framework/src/Volo.Abp.Http.Abstractions/Volo.Abp.Http.Abstractions.csproj b/framework/src/Volo.Abp.Http.Abstractions/Volo.Abp.Http.Abstractions.csproj index 332c803147..adbc783c15 100644 --- a/framework/src/Volo.Abp.Http.Abstractions/Volo.Abp.Http.Abstractions.csproj +++ b/framework/src/Volo.Abp.Http.Abstractions/Volo.Abp.Http.Abstractions.csproj @@ -5,6 +5,8 @@ netstandard2.0;netstandard2.1;net7.0 + enable + Nullable Volo.Abp.Http.Abstractions Volo.Abp.Http.Abstractions $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.Http.Abstractions/Volo/Abp/Http/ClientProxyExceptionEventData.cs b/framework/src/Volo.Abp.Http.Abstractions/Volo/Abp/Http/ClientProxyExceptionEventData.cs index 1bc17c7b65..029556c00e 100644 --- a/framework/src/Volo.Abp.Http.Abstractions/Volo/Abp/Http/ClientProxyExceptionEventData.cs +++ b/framework/src/Volo.Abp.Http.Abstractions/Volo/Abp/Http/ClientProxyExceptionEventData.cs @@ -4,5 +4,5 @@ public class ClientProxyExceptionEventData { public int? StatusCode { get; set; } - public string ReasonPhrase { get; set; } + public string? ReasonPhrase { get; set; } } diff --git a/framework/src/Volo.Abp.Http.Client.Dapr/Volo.Abp.Http.Client.Dapr.csproj b/framework/src/Volo.Abp.Http.Client.Dapr/Volo.Abp.Http.Client.Dapr.csproj index 0d22e68b97..1fd0b7b07b 100644 --- a/framework/src/Volo.Abp.Http.Client.Dapr/Volo.Abp.Http.Client.Dapr.csproj +++ b/framework/src/Volo.Abp.Http.Client.Dapr/Volo.Abp.Http.Client.Dapr.csproj @@ -5,6 +5,8 @@ net7.0 + enable + Nullable diff --git a/framework/src/Volo.Abp.Http.Client.Dapr/Volo/Abp/Http/Client/Dapr/AbpInvocationHandler.cs b/framework/src/Volo.Abp.Http.Client.Dapr/Volo/Abp/Http/Client/Dapr/AbpInvocationHandler.cs index 9ebfb5665d..4a17c3b67a 100644 --- a/framework/src/Volo.Abp.Http.Client.Dapr/Volo/Abp/Http/Client/Dapr/AbpInvocationHandler.cs +++ b/framework/src/Volo.Abp.Http.Client.Dapr/Volo/Abp/Http/Client/Dapr/AbpInvocationHandler.cs @@ -12,7 +12,7 @@ public class AbpInvocationHandler : InvocationHandler, ITransientDependency { if (!daprOptions.Value.HttpEndpoint.IsNullOrWhiteSpace()) { - DaprEndpoint = daprOptions.Value.HttpEndpoint; + DaprEndpoint = daprOptions.Value.HttpEndpoint!; } } } diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.MauiBlazor/Volo.Abp.Http.Client.IdentityModel.MauiBlazor.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel.MauiBlazor/Volo.Abp.Http.Client.IdentityModel.MauiBlazor.csproj index 671fd3db2d..4a92cc975d 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.MauiBlazor/Volo.Abp.Http.Client.IdentityModel.MauiBlazor.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.MauiBlazor/Volo.Abp.Http.Client.IdentityModel.MauiBlazor.csproj @@ -5,6 +5,8 @@ net7.0 + enable + Nullable Volo.Abp.Http.Client.IdentityModel.MauiBlazor $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; false diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.MauiBlazor/Volo/Abp/Http/Client/IdentityModel/MauiBlazor/MauiBlazorAbpAccessTokenProvider.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel.MauiBlazor/Volo/Abp/Http/Client/IdentityModel/MauiBlazor/MauiBlazorAbpAccessTokenProvider.cs index 8afbcbafed..3f923aa9bb 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.MauiBlazor/Volo/Abp/Http/Client/IdentityModel/MauiBlazor/MauiBlazorAbpAccessTokenProvider.cs +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.MauiBlazor/Volo/Abp/Http/Client/IdentityModel/MauiBlazor/MauiBlazorAbpAccessTokenProvider.cs @@ -7,7 +7,7 @@ namespace Volo.Abp.Http.Client.IdentityModel.MauiBlazor; [Dependency(ReplaceServices = true)] public class MauiBlazorAbpAccessTokenProvider : IAbpAccessTokenProvider, ITransientDependency { - public virtual Task GetTokenAsync() + public virtual Task GetTokenAsync() { return Task.FromResult(null as string); } diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj index 4fc1525e59..05d1a14ef8 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo.Abp.Http.Client.IdentityModel.Web.csproj @@ -5,6 +5,8 @@ net7.0 + enable + Nullable Volo.Abp.Http.Client.IdentityModel.Web Volo.Abp.Http.Client.IdentityModel.Web $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextAbpAccessTokenProvider.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextAbpAccessTokenProvider.cs index 97d88bd3b0..5044513438 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextAbpAccessTokenProvider.cs +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.Web/Volo/Abp/Http/Client/IdentityModel/Web/HttpContextAbpAccessTokenProvider.cs @@ -16,7 +16,7 @@ public class HttpContextAbpAccessTokenProvider : IAbpAccessTokenProvider, ITrans HttpContextAccessor = httpContextAccessor; } - public virtual async Task GetTokenAsync() + public virtual async Task GetTokenAsync() { var httpContext = HttpContextAccessor?.HttpContext; if (httpContext == null) diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj index e98f5d92ff..42d60909bc 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo.Abp.Http.Client.IdentityModel.WebAssembly.csproj @@ -5,6 +5,8 @@ net7.0 + enable + Nullable Volo.Abp.Http.Client.IdentityModel.WebAssembly Volo.Abp.Http.Client.IdentityModel.WebAssembly $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/WebAssemblyAbpAccessTokenProvider.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/WebAssemblyAbpAccessTokenProvider.cs index d0a68cdb7c..137787820b 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/WebAssemblyAbpAccessTokenProvider.cs +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel.WebAssembly/Volo/Abp/Http/Client/IdentityModel/WebAssembly/WebAssemblyAbpAccessTokenProvider.cs @@ -8,14 +8,14 @@ namespace Volo.Abp.Http.Client.IdentityModel.WebAssembly; [Dependency(ReplaceServices = true)] public class WebAssemblyAbpAccessTokenProvider : IAbpAccessTokenProvider, ITransientDependency { - protected IAccessTokenProvider AccessTokenProvider { get; } + protected IAccessTokenProvider? AccessTokenProvider { get; } public WebAssemblyAbpAccessTokenProvider(IAccessTokenProvider accessTokenProvider) { AccessTokenProvider = accessTokenProvider; } - public virtual async Task GetTokenAsync() + public virtual async Task GetTokenAsync() { if (AccessTokenProvider == null) { diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj index 083e987d49..3e791a1e69 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo.Abp.Http.Client.IdentityModel.csproj @@ -5,6 +5,8 @@ netstandard2.0;netstandard2.1;net7.0 + enable + Nullable Volo.Abp.Http.Client.IdentityModel Volo.Abp.Http.Client.IdentityModel $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/RemoteServiceConfigurationExtensions.cs b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/RemoteServiceConfigurationExtensions.cs index 417875619b..58c4b71078 100644 --- a/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/RemoteServiceConfigurationExtensions.cs +++ b/framework/src/Volo.Abp.Http.Client.IdentityModel/Volo/Abp/Http/Client/RemoteServiceConfigurationExtensions.cs @@ -8,8 +8,7 @@ public static class RemoteServiceConfigurationExtensions public const string IdentityClientName = "IdentityClient"; public const string UseCurrentAccessTokenName = "UseCurrentAccessToken"; - [CanBeNull] - public static string GetIdentityClient([NotNull] this RemoteServiceConfiguration configuration) + public static string? GetIdentityClient([NotNull] this RemoteServiceConfiguration configuration) { Check.NotNullOrEmpty(configuration, nameof(configuration)); diff --git a/framework/src/Volo.Abp.Http.Client.Web/Volo.Abp.Http.Client.Web.csproj b/framework/src/Volo.Abp.Http.Client.Web/Volo.Abp.Http.Client.Web.csproj index 68bbbd1157..63da778ecd 100644 --- a/framework/src/Volo.Abp.Http.Client.Web/Volo.Abp.Http.Client.Web.csproj +++ b/framework/src/Volo.Abp.Http.Client.Web/Volo.Abp.Http.Client.Web.csproj @@ -5,6 +5,8 @@ net7.0 + enable + Nullable Volo.Abp.Http.Client.Web Volo.Abp.Http.Client.Web $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs b/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs index 49080939c2..a7a2aad343 100644 --- a/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs +++ b/framework/src/Volo.Abp.Http.Client.Web/Volo/Abp/Http/Client/Web/Conventions/AbpHttpClientProxyServiceConvention.cs @@ -69,7 +69,7 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention if (controllerApiDescription != null && !controllerApiDescription.ControllerGroupName.IsNullOrWhiteSpace()) { - controller.ControllerName = controllerApiDescription.ControllerGroupName; + controller.ControllerName = controllerApiDescription.ControllerGroupName!; } ConfigureClientProxySelector(controller); @@ -115,7 +115,7 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention { var selector = controller.Selectors.FirstOrDefault(); selector?.EndpointMetadata.Add(new AreaAttribute(moduleApiDescription.RootPath)); - controller.RouteValues.Add(new KeyValuePair("area", moduleApiDescription.RootPath)); + controller.RouteValues.Add(new KeyValuePair("area", moduleApiDescription.RootPath)); } var controllerType = controller.ControllerType.AsType(); @@ -163,7 +163,7 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention var abpServiceSelectorModel = new SelectorModel { AttributeRouteModel = new AttributeRouteModel(new RouteAttribute(template: actionApiDescriptionModel.Url)), - ActionConstraints = { new HttpMethodActionConstraint(new[] { actionApiDescriptionModel.HttpMethod }) } + ActionConstraints = { new HttpMethodActionConstraint(new[] { actionApiDescriptionModel.HttpMethod! }) } }; action.Selectors.Add(abpServiceSelectorModel); @@ -190,7 +190,7 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention if (!selector.ActionConstraints.OfType().Any()) { - selector.ActionConstraints.Add(new HttpMethodActionConstraint(new[] { httpMethod })); + selector.ActionConstraints.Add(new HttpMethodActionConstraint(new[] { httpMethod! })); } } } @@ -226,7 +226,7 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention } } - protected virtual ModuleApiDescriptionModel FindModuleApiDescriptionModel(ControllerModel controller) + protected virtual ModuleApiDescriptionModel? FindModuleApiDescriptionModel(ControllerModel controller) { var appServiceType = FindAppServiceInterfaceType(controller); if (appServiceType == null) @@ -246,7 +246,7 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention return null; } - protected virtual ControllerApiDescriptionModel FindControllerApiDescriptionModel(ControllerModel controller) + protected virtual ControllerApiDescriptionModel? FindControllerApiDescriptionModel(ControllerModel controller) { var appServiceType = FindAppServiceInterfaceType(controller); if (appServiceType == null) @@ -266,7 +266,7 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention return null; } - protected virtual ActionApiDescriptionModel FindActionApiDescriptionModel(ControllerModel controller, ActionModel action) + protected virtual ActionApiDescriptionModel? FindActionApiDescriptionModel(ControllerModel controller, ActionModel action) { var appServiceType = FindAppServiceInterfaceType(controller); if (appServiceType == null) @@ -285,7 +285,7 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention return null; } - if (actionApiDescriptionModel.ImplementFrom.StartsWith("Volo.Abp.Application.Services")) + if (actionApiDescriptionModel.ImplementFrom!.StartsWith("Volo.Abp.Application.Services")) { return actionApiDescriptionModel; } @@ -298,7 +298,7 @@ public class AbpHttpClientProxyServiceConvention : AbpServiceConvention return null; } - protected virtual Type FindAppServiceInterfaceType(ControllerModel controller) + protected virtual Type? FindAppServiceInterfaceType(ControllerModel controller) { return controller.ControllerType.GetInterfaces() .FirstOrDefault(type => !type.IsGenericType && diff --git a/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj b/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj index a707f58b9c..b0c2b3e567 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj +++ b/framework/src/Volo.Abp.IdentityModel/Volo.Abp.IdentityModel.csproj @@ -5,6 +5,8 @@ netstandard2.0;netstandard2.1;net7.0 + enable + Nullable Volo.Abp.IdentityModel Volo.Abp.IdentityModel $(AssetTargetFallback);portable-net45+win8+wp8+wpa81; diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs index 364d2dc2ea..62fc21a5fa 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/AbpIdentityClientOptions.cs @@ -14,7 +14,7 @@ public class AbpIdentityClientOptions IdentityClients = new IdentityClientConfigurationDictionary(); } - public IdentityClientConfiguration GetClientConfiguration(ICurrentTenant currentTenant, string identityClientName = null) + public IdentityClientConfiguration? GetClientConfiguration(ICurrentTenant currentTenant, string? identityClientName = null) { if (identityClientName.IsNullOrWhiteSpace()) { @@ -35,7 +35,7 @@ public class AbpIdentityClientOptions } } - return IdentityClients.GetOrDefault(identityClientName) ?? + return IdentityClients.GetOrDefault(identityClientName!) ?? IdentityClients.Default; } } diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IIdentityModelAuthenticationService.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IIdentityModelAuthenticationService.cs index fee1a032fb..8a5902bdbf 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IIdentityModelAuthenticationService.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IIdentityModelAuthenticationService.cs @@ -9,7 +9,7 @@ public interface IIdentityModelAuthenticationService { Task TryAuthenticateAsync( [NotNull] HttpClient client, - string identityClientName = null); + string? identityClientName = null); Task GetAccessTokenAsync( IdentityClientConfiguration configuration); diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfiguration.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfiguration.cs index 8faf3225ab..011e40b4b3 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfiguration.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfiguration.cs @@ -5,14 +5,14 @@ using IdentityModel; namespace Volo.Abp.IdentityModel; -public class IdentityClientConfiguration : Dictionary +public class IdentityClientConfiguration : Dictionary { /// /// Possible values: "client_credentials" or "password". /// Default value: "client_credentials". /// public string GrantType { - get => this.GetOrDefault(nameof(GrantType)); + get => this.GetOrDefault(nameof(GrantType))!; set => this[nameof(GrantType)] = value; } @@ -20,7 +20,7 @@ public class IdentityClientConfiguration : Dictionary /// Client Id. /// public string ClientId { - get => this.GetOrDefault(nameof(ClientId)); + get => this.GetOrDefault(nameof(ClientId))!; set => this[nameof(ClientId)] = value; } @@ -28,7 +28,7 @@ public class IdentityClientConfiguration : Dictionary /// Client secret (as plain text - without hashed). /// public string ClientSecret { - get => this.GetOrDefault(nameof(ClientSecret)); + get => this.GetOrDefault(nameof(ClientSecret))!; set => this[nameof(ClientSecret)] = value; } @@ -36,7 +36,7 @@ public class IdentityClientConfiguration : Dictionary /// User name. /// Valid only if is "password". /// - public string UserName { + public string? UserName { get => this.GetOrDefault(nameof(UserName)); set => this[nameof(UserName)] = value; } @@ -45,7 +45,7 @@ public class IdentityClientConfiguration : Dictionary /// Password of the . /// Valid only if is "password". /// - public string UserPassword { + public string? UserPassword { get => this.GetOrDefault(nameof(UserPassword)); set => this[nameof(UserPassword)] = value; } @@ -54,7 +54,7 @@ public class IdentityClientConfiguration : Dictionary /// Authority. /// public string Authority { - get => this.GetOrDefault(nameof(Authority)); + get => this.GetOrDefault(nameof(Authority))!; set => this[nameof(Authority)] = value; } @@ -62,7 +62,7 @@ public class IdentityClientConfiguration : Dictionary /// Scope. /// public string Scope { - get => this.GetOrDefault(nameof(Scope)); + get => this.GetOrDefault(nameof(Scope))!; set => this[nameof(Scope)] = value; } @@ -113,8 +113,8 @@ public class IdentityClientConfiguration : Dictionary string clientId, string clientSecret, string grantType = OidcConstants.GrantTypes.ClientCredentials, - string userName = null, - string userPassword = null, + string? userName = null, + string? userPassword = null, bool requireHttps = true, int cacheAbsoluteExpiration = 60 * 30, bool validateIssuerName = true, diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfigurationDictionary.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfigurationDictionary.cs index e8c42fe390..4993cfa462 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfigurationDictionary.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityClientConfigurationDictionary.cs @@ -2,11 +2,11 @@ namespace Volo.Abp.IdentityModel; -public class IdentityClientConfigurationDictionary : Dictionary +public class IdentityClientConfigurationDictionary : Dictionary { public const string DefaultName = "Default"; - public IdentityClientConfiguration Default { + public IdentityClientConfiguration? Default { get => this.GetOrDefault(DefaultName); set => this[DefaultName] = value; } diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs index 6f5f8eda95..4354d83735 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelAuthenticationService.cs @@ -54,7 +54,7 @@ public class IdentityModelAuthenticationService : IIdentityModelAuthenticationSe public async Task TryAuthenticateAsync( [NotNull] HttpClient client, - string identityClientName = null) + string? identityClientName = null) { var accessToken = await GetAccessTokenOrNullAsync(identityClientName); if (accessToken == null) @@ -66,7 +66,7 @@ public class IdentityModelAuthenticationService : IIdentityModelAuthenticationSe return true; } - protected virtual async Task GetAccessTokenOrNullAsync(string identityClientName) + protected virtual async Task GetAccessTokenOrNullAsync(string? identityClientName) { var configuration = ClientOptions.GetClientConfiguration(CurrentTenant, identityClientName); if (configuration == null) diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelDiscoveryDocumentCacheItem.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelDiscoveryDocumentCacheItem.cs index 0fbf50d020..6cabe5d9b9 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelDiscoveryDocumentCacheItem.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelDiscoveryDocumentCacheItem.cs @@ -7,9 +7,9 @@ namespace Volo.Abp.IdentityModel; [IgnoreMultiTenancy] public class IdentityModelDiscoveryDocumentCacheItem { - public string TokenEndpoint { get; set; } + public string TokenEndpoint { get; set; } = default!; - public string DeviceAuthorizationEndpoint { get; set; } + public string DeviceAuthorizationEndpoint { get; set; } = default!; public IdentityModelDiscoveryDocumentCacheItem() { diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelHttpRequestMessageOptions.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelHttpRequestMessageOptions.cs index d72cc9682e..78b2a342f4 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelHttpRequestMessageOptions.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelHttpRequestMessageOptions.cs @@ -5,5 +5,5 @@ namespace Volo.Abp.IdentityModel; public class IdentityModelHttpRequestMessageOptions { - public Action ConfigureHttpRequestMessage { get; set; } + public Action? ConfigureHttpRequestMessage { get; set; } } diff --git a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelTokenCacheItem.cs b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelTokenCacheItem.cs index 2a164a23e6..72beed1577 100644 --- a/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelTokenCacheItem.cs +++ b/framework/src/Volo.Abp.IdentityModel/Volo/Abp/IdentityModel/IdentityModelTokenCacheItem.cs @@ -7,7 +7,7 @@ namespace Volo.Abp.IdentityModel; [Serializable] public class IdentityModelTokenCacheItem { - public string AccessToken { get; set; } + public string AccessToken { get; set; } = default!; public IdentityModelTokenCacheItem() {