Browse Source

Use <see langword="*"/> instead of <c>*</c>

pull/1415/head
Kévin Chalet 5 years ago
parent
commit
5fb23d5779
  1. 4
      shared/OpenIddict.Extensions/Helpers/OpenIddictHelpers.cs
  2. 8
      src/OpenIddict.Abstractions/Managers/IOpenIddictApplicationManager.cs
  3. 8
      src/OpenIddict.Abstractions/Managers/IOpenIddictAuthorizationManager.cs
  4. 12
      src/OpenIddict.Abstractions/Managers/IOpenIddictTokenManager.cs
  5. 2
      src/OpenIddict.Abstractions/Primitives/OpenIddictConverter.cs
  6. 76
      src/OpenIddict.Abstractions/Primitives/OpenIddictExtensions.cs
  7. 6
      src/OpenIddict.Abstractions/Primitives/OpenIddictMessage.cs
  8. 18
      src/OpenIddict.Abstractions/Primitives/OpenIddictParameter.cs
  9. 2
      src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreBuilder.cs
  10. 6
      src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHelpers.cs
  11. 2
      src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpBuilder.cs
  12. 4
      src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHelpers.cs
  13. 8
      src/OpenIddict.Client/OpenIddictClientBuilder.cs
  14. 4
      src/OpenIddict.Client/OpenIddictClientEvents.Authentication.cs
  15. 4
      src/OpenIddict.Client/OpenIddictClientEvents.Discovery.cs
  16. 2
      src/OpenIddict.Client/OpenIddictClientEvents.Exchange.cs
  17. 4
      src/OpenIddict.Client/OpenIddictClientEvents.Protection.cs
  18. 2
      src/OpenIddict.Client/OpenIddictClientEvents.Userinfo.cs
  19. 4
      src/OpenIddict.Client/OpenIddictClientEvents.cs
  20. 2
      src/OpenIddict.Client/OpenIddictClientHelpers.cs
  21. 10
      src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs
  22. 8
      src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs
  23. 4
      src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs
  24. 12
      src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs
  25. 4
      src/OpenIddict.Core/OpenIddictCoreOptions.cs
  26. 2
      src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkApplication.cs
  27. 2
      src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkAuthorization.cs
  28. 2
      src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkScope.cs
  29. 2
      src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkToken.cs
  30. 4
      src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkAuthorizationStore.cs
  31. 10
      src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs
  32. 2
      src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreApplication.cs
  33. 2
      src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreAuthorization.cs
  34. 2
      src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreScope.cs
  35. 2
      src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreToken.cs
  36. 4
      src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreAuthorizationStore.cs
  37. 10
      src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs
  38. 2
      src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs
  39. 6
      src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHelpers.cs
  40. 2
      src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs
  41. 12
      src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionOptions.cs
  42. 6
      src/OpenIddict.Server.Owin/OpenIddictServerOwinHelpers.cs
  43. 2
      src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs
  44. 16
      src/OpenIddict.Server/OpenIddictServerBuilder.cs
  45. 6
      src/OpenIddict.Server/OpenIddictServerEvents.Authentication.cs
  46. 12
      src/OpenIddict.Server/OpenIddictServerEvents.Device.cs
  47. 12
      src/OpenIddict.Server/OpenIddictServerEvents.Discovery.cs
  48. 6
      src/OpenIddict.Server/OpenIddictServerEvents.Exchange.cs
  49. 8
      src/OpenIddict.Server/OpenIddictServerEvents.Introspection.cs
  50. 4
      src/OpenIddict.Server/OpenIddictServerEvents.Protection.cs
  51. 8
      src/OpenIddict.Server/OpenIddictServerEvents.Revocation.cs
  52. 6
      src/OpenIddict.Server/OpenIddictServerEvents.Session.cs
  53. 6
      src/OpenIddict.Server/OpenIddictServerEvents.Userinfo.cs
  54. 16
      src/OpenIddict.Server/OpenIddictServerEvents.cs
  55. 2
      src/OpenIddict.Server/OpenIddictServerHelpers.cs
  56. 6
      src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHelpers.cs
  57. 2
      src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionOptions.cs
  58. 6
      src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHelpers.cs
  59. 4
      src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHelpers.cs
  60. 2
      src/OpenIddict.Validation/OpenIddictValidationBuilder.cs
  61. 4
      src/OpenIddict.Validation/OpenIddictValidationEvents.Discovery.cs
  62. 2
      src/OpenIddict.Validation/OpenIddictValidationEvents.Introspection.cs
  63. 2
      src/OpenIddict.Validation/OpenIddictValidationEvents.Protection.cs
  64. 2
      src/OpenIddict.Validation/OpenIddictValidationEvents.cs
  65. 2
      src/OpenIddict.Validation/OpenIddictValidationHelpers.cs

4
shared/OpenIddict.Extensions/Helpers/OpenIddictHelpers.cs

@ -10,7 +10,7 @@ internal static class OpenIddictHelpers
/// </summary> /// </summary>
/// <param name="type">The type to introspect.</param> /// <param name="type">The type to introspect.</param>
/// <param name="definition">The generic type definition.</param> /// <param name="definition">The generic type definition.</param>
/// <returns>A <see cref="Type"/> instance if the base type was found, <c>null</c> otherwise.</returns> /// <returns>A <see cref="Type"/> instance if the base type was found, <see langword="null"/> otherwise.</returns>
public static Type? FindGenericBaseType(Type type, Type definition) public static Type? FindGenericBaseType(Type type, Type definition)
=> FindGenericBaseTypes(type, definition).FirstOrDefault(); => FindGenericBaseTypes(type, definition).FirstOrDefault();
@ -19,7 +19,7 @@ internal static class OpenIddictHelpers
/// </summary> /// </summary>
/// <param name="type">The type to introspect.</param> /// <param name="type">The type to introspect.</param>
/// <param name="definition">The generic type definition.</param> /// <param name="definition">The generic type definition.</param>
/// <returns>A <see cref="Type"/> instance if the base type was found, <c>null</c> otherwise.</returns> /// <returns>A <see cref="Type"/> instance if the base type was found, <see langword="null"/> otherwise.</returns>
public static IEnumerable<Type> FindGenericBaseTypes(Type type!!, Type definition!!) public static IEnumerable<Type> FindGenericBaseTypes(Type type!!, Type definition!!)
{ {
if (!definition.IsGenericTypeDefinition) if (!definition.IsGenericTypeDefinition)

8
src/OpenIddict.Abstractions/Managers/IOpenIddictApplicationManager.cs

@ -310,7 +310,7 @@ public interface IOpenIddictApplicationManager
/// <param name="application">The application.</param> /// <param name="application">The application.</param>
/// <param name="type">The expected client type.</param> /// <param name="type">The expected client type.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the application has the specified client type, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the application has the specified client type, <see langword="false"/> otherwise.</returns>
ValueTask<bool> HasClientTypeAsync(object application, string type, CancellationToken cancellationToken = default); ValueTask<bool> HasClientTypeAsync(object application, string type, CancellationToken cancellationToken = default);
/// <summary> /// <summary>
@ -319,7 +319,7 @@ public interface IOpenIddictApplicationManager
/// <param name="application">The application.</param> /// <param name="application">The application.</param>
/// <param name="type">The expected consent type.</param> /// <param name="type">The expected consent type.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the application has the specified consent type, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the application has the specified consent type, <see langword="false"/> otherwise.</returns>
ValueTask<bool> HasConsentTypeAsync(object application, string type, CancellationToken cancellationToken = default); ValueTask<bool> HasConsentTypeAsync(object application, string type, CancellationToken cancellationToken = default);
/// <summary> /// <summary>
@ -328,7 +328,7 @@ public interface IOpenIddictApplicationManager
/// <param name="application">The application.</param> /// <param name="application">The application.</param>
/// <param name="permission">The permission.</param> /// <param name="permission">The permission.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the application has been granted the specified permission, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the application has been granted the specified permission, <see langword="false"/> otherwise.</returns>
ValueTask<bool> HasPermissionAsync(object application, string permission, CancellationToken cancellationToken = default); ValueTask<bool> HasPermissionAsync(object application, string permission, CancellationToken cancellationToken = default);
/// <summary> /// <summary>
@ -337,7 +337,7 @@ public interface IOpenIddictApplicationManager
/// <param name="application">The application.</param> /// <param name="application">The application.</param>
/// <param name="requirement">The requirement.</param> /// <param name="requirement">The requirement.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the requirement has been enforced for the specified application, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the requirement has been enforced for the specified application, <see langword="false"/> otherwise.</returns>
ValueTask<bool> HasRequirementAsync(object application, string requirement, CancellationToken cancellationToken = default); ValueTask<bool> HasRequirementAsync(object application, string requirement, CancellationToken cancellationToken = default);
/// <summary> /// <summary>

8
src/OpenIddict.Abstractions/Managers/IOpenIddictAuthorizationManager.cs

@ -289,7 +289,7 @@ public interface IOpenIddictAuthorizationManager
/// <param name="authorization">The authorization.</param> /// <param name="authorization">The authorization.</param>
/// <param name="scopes">The scopes.</param> /// <param name="scopes">The scopes.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the scopes are included in the authorization, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the scopes are included in the authorization, <see langword="false"/> otherwise.</returns>
ValueTask<bool> HasScopesAsync(object authorization, ImmutableArray<string> scopes, CancellationToken cancellationToken = default); ValueTask<bool> HasScopesAsync(object authorization, ImmutableArray<string> scopes, CancellationToken cancellationToken = default);
/// <summary> /// <summary>
@ -298,7 +298,7 @@ public interface IOpenIddictAuthorizationManager
/// <param name="authorization">The authorization.</param> /// <param name="authorization">The authorization.</param>
/// <param name="status">The expected status.</param> /// <param name="status">The expected status.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the authorization has the specified status, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the authorization has the specified status, <see langword="false"/> otherwise.</returns>
ValueTask<bool> HasStatusAsync(object authorization, string status, CancellationToken cancellationToken = default); ValueTask<bool> HasStatusAsync(object authorization, string status, CancellationToken cancellationToken = default);
/// <summary> /// <summary>
@ -307,7 +307,7 @@ public interface IOpenIddictAuthorizationManager
/// <param name="authorization">The authorization.</param> /// <param name="authorization">The authorization.</param>
/// <param name="type">The expected type.</param> /// <param name="type">The expected type.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the authorization has the specified type, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the authorization has the specified type, <see langword="false"/> otherwise.</returns>
ValueTask<bool> HasTypeAsync(object authorization, string type, CancellationToken cancellationToken = default); ValueTask<bool> HasTypeAsync(object authorization, string type, CancellationToken cancellationToken = default);
/// <summary> /// <summary>
@ -385,7 +385,7 @@ public interface IOpenIddictAuthorizationManager
/// </summary> /// </summary>
/// <param name="authorization">The authorization to revoke.</param> /// <param name="authorization">The authorization to revoke.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the authorization was successfully revoked, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the authorization was successfully revoked, <see langword="false"/> otherwise.</returns>
ValueTask<bool> TryRevokeAsync(object authorization, CancellationToken cancellationToken = default); ValueTask<bool> TryRevokeAsync(object authorization, CancellationToken cancellationToken = default);
/// <summary> /// <summary>

12
src/OpenIddict.Abstractions/Managers/IOpenIddictTokenManager.cs

@ -324,7 +324,7 @@ public interface IOpenIddictTokenManager
/// <param name="token">The token.</param> /// <param name="token">The token.</param>
/// <param name="status">The expected status.</param> /// <param name="status">The expected status.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the token has the specified status, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the token has the specified status, <see langword="false"/> otherwise.</returns>
ValueTask<bool> HasStatusAsync(object token, string status, CancellationToken cancellationToken = default); ValueTask<bool> HasStatusAsync(object token, string status, CancellationToken cancellationToken = default);
/// <summary> /// <summary>
@ -333,7 +333,7 @@ public interface IOpenIddictTokenManager
/// <param name="token">The token.</param> /// <param name="token">The token.</param>
/// <param name="type">The expected type.</param> /// <param name="type">The expected type.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the token has the specified type, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the token has the specified type, <see langword="false"/> otherwise.</returns>
ValueTask<bool> HasTypeAsync(object token, string type, CancellationToken cancellationToken = default); ValueTask<bool> HasTypeAsync(object token, string type, CancellationToken cancellationToken = default);
/// <summary> /// <summary>
@ -342,7 +342,7 @@ public interface IOpenIddictTokenManager
/// <param name="token">The token.</param> /// <param name="token">The token.</param>
/// <param name="types">The expected types.</param> /// <param name="types">The expected types.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the token has any of the specified types, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the token has any of the specified types, <see langword="false"/> otherwise.</returns>
ValueTask<bool> HasTypeAsync(object token, ImmutableArray<string> types, CancellationToken cancellationToken = default); ValueTask<bool> HasTypeAsync(object token, ImmutableArray<string> types, CancellationToken cancellationToken = default);
/// <summary> /// <summary>
@ -416,7 +416,7 @@ public interface IOpenIddictTokenManager
/// </summary> /// </summary>
/// <param name="token">The token to redeem.</param> /// <param name="token">The token to redeem.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the token was successfully redemeed, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the token was successfully redemeed, <see langword="false"/> otherwise.</returns>
ValueTask<bool> TryRedeemAsync(object token, CancellationToken cancellationToken = default); ValueTask<bool> TryRedeemAsync(object token, CancellationToken cancellationToken = default);
/// <summary> /// <summary>
@ -424,7 +424,7 @@ public interface IOpenIddictTokenManager
/// </summary> /// </summary>
/// <param name="token">The token to reject.</param> /// <param name="token">The token to reject.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the token was successfully redemeed, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the token was successfully redemeed, <see langword="false"/> otherwise.</returns>
ValueTask<bool> TryRejectAsync(object token, CancellationToken cancellationToken = default); ValueTask<bool> TryRejectAsync(object token, CancellationToken cancellationToken = default);
/// <summary> /// <summary>
@ -432,7 +432,7 @@ public interface IOpenIddictTokenManager
/// </summary> /// </summary>
/// <param name="token">The token to revoke.</param> /// <param name="token">The token to revoke.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the token was successfully revoked, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the token was successfully revoked, <see langword="false"/> otherwise.</returns>
ValueTask<bool> TryRevokeAsync(object token, CancellationToken cancellationToken = default); ValueTask<bool> TryRevokeAsync(object token, CancellationToken cancellationToken = default);
/// <summary> /// <summary>

2
src/OpenIddict.Abstractions/Primitives/OpenIddictConverter.cs

@ -18,7 +18,7 @@ public class OpenIddictConverter : JsonConverter<OpenIddictMessage>
/// Determines whether the specified type is supported by this converter. /// Determines whether the specified type is supported by this converter.
/// </summary> /// </summary>
/// <param name="typeToConvert">The type to convert.</param> /// <param name="typeToConvert">The type to convert.</param>
/// <returns><c>true</c> if the type is supported, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the type is supported, <see langword="false"/> otherwise.</returns>
public override bool CanConvert(Type typeToConvert!!) public override bool CanConvert(Type typeToConvert!!)
{ {
return typeToConvert == typeof(OpenIddictMessage) || return typeToConvert == typeof(OpenIddictMessage) ||

76
src/OpenIddict.Abstractions/Primitives/OpenIddictExtensions.cs

@ -114,7 +114,7 @@ public static class OpenIddictExtensions
/// See http://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#none for more information. /// See http://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#none for more information.
/// </summary> /// </summary>
/// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param> /// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param>
/// <returns><c>true</c> if the request is a response_type=none request, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the request is a response_type=none request, <see langword="false"/> otherwise.</returns>
public static bool IsNoneFlow(this OpenIddictRequest request!!) public static bool IsNoneFlow(this OpenIddictRequest request!!)
{ {
if (string.IsNullOrEmpty(request.ResponseType)) if (string.IsNullOrEmpty(request.ResponseType))
@ -136,7 +136,7 @@ public static class OpenIddictExtensions
/// See http://tools.ietf.org/html/rfc6749#section-4.1.1 for more information. /// See http://tools.ietf.org/html/rfc6749#section-4.1.1 for more information.
/// </summary> /// </summary>
/// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param> /// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param>
/// <returns><c>true</c> if the request is a code flow request, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the request is a code flow request, <see langword="false"/> otherwise.</returns>
public static bool IsAuthorizationCodeFlow(this OpenIddictRequest request!!) public static bool IsAuthorizationCodeFlow(this OpenIddictRequest request!!)
{ {
if (string.IsNullOrEmpty(request.ResponseType)) if (string.IsNullOrEmpty(request.ResponseType))
@ -159,7 +159,7 @@ public static class OpenIddictExtensions
/// http://openid.net/specs/openid-connect-core-1_0.html for more information /// http://openid.net/specs/openid-connect-core-1_0.html for more information
/// </summary> /// </summary>
/// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param> /// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param>
/// <returns><c>true</c> if the request is an implicit flow request, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the request is an implicit flow request, <see langword="false"/> otherwise.</returns>
public static bool IsImplicitFlow(this OpenIddictRequest request!!) public static bool IsImplicitFlow(this OpenIddictRequest request!!)
{ {
if (string.IsNullOrEmpty(request.ResponseType)) if (string.IsNullOrEmpty(request.ResponseType))
@ -208,7 +208,7 @@ public static class OpenIddictExtensions
/// http://openid.net/specs/openid-connect-core-1_0.html for more information. /// http://openid.net/specs/openid-connect-core-1_0.html for more information.
/// </summary> /// </summary>
/// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param> /// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param>
/// <returns><c>true</c> if the request is an hybrid flow request, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the request is an hybrid flow request, <see langword="false"/> otherwise.</returns>
public static bool IsHybridFlow(this OpenIddictRequest request!!) public static bool IsHybridFlow(this OpenIddictRequest request!!)
{ {
if (string.IsNullOrEmpty(request.ResponseType)) if (string.IsNullOrEmpty(request.ResponseType))
@ -268,8 +268,8 @@ public static class OpenIddictExtensions
/// </summary> /// </summary>
/// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param> /// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param>
/// <returns> /// <returns>
/// <c>true</c> if the request specified the fragment response mode or if /// <see langword="true"/> if the request specified the fragment response mode or if
/// it's the default value for the requested flow, <c>false</c> otherwise. /// it's the default value for the requested flow, <see langword="false"/> otherwise.
/// </returns> /// </returns>
public static bool IsFragmentResponseMode(this OpenIddictRequest request!!) public static bool IsFragmentResponseMode(this OpenIddictRequest request!!)
{ {
@ -296,8 +296,8 @@ public static class OpenIddictExtensions
/// </summary> /// </summary>
/// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param> /// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param>
/// <returns> /// <returns>
/// <c>true</c> if the request specified the query response mode or if /// <see langword="true"/> if the request specified the query response mode or if
/// it's the default value for the requested flow, <c>false</c> otherwise. /// it's the default value for the requested flow, <see langword="false"/> otherwise.
/// </returns> /// </returns>
public static bool IsQueryResponseMode(this OpenIddictRequest request!!) public static bool IsQueryResponseMode(this OpenIddictRequest request!!)
{ {
@ -323,8 +323,8 @@ public static class OpenIddictExtensions
/// </summary> /// </summary>
/// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param> /// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param>
/// <returns> /// <returns>
/// <c>true</c> if the request specified the form post response mode or if /// <see langword="true"/> if the request specified the form post response mode or if
/// it's the default value for the requested flow, <c>false</c> otherwise. /// it's the default value for the requested flow, <see langword="false"/> otherwise.
/// </returns> /// </returns>
public static bool IsFormPostResponseMode(this OpenIddictRequest request!!) public static bool IsFormPostResponseMode(this OpenIddictRequest request!!)
=> string.Equals(request.ResponseMode, ResponseModes.FormPost, StringComparison.Ordinal); => string.Equals(request.ResponseMode, ResponseModes.FormPost, StringComparison.Ordinal);
@ -334,7 +334,7 @@ public static class OpenIddictExtensions
/// See http://tools.ietf.org/html/rfc6749#section-4.1.3 for more information. /// See http://tools.ietf.org/html/rfc6749#section-4.1.3 for more information.
/// </summary> /// </summary>
/// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param> /// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param>
/// <returns><c>true</c> if the request is a code grant request, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the request is a code grant request, <see langword="false"/> otherwise.</returns>
public static bool IsAuthorizationCodeGrantType(this OpenIddictRequest request!!) public static bool IsAuthorizationCodeGrantType(this OpenIddictRequest request!!)
=> string.Equals(request.GrantType, GrantTypes.AuthorizationCode, StringComparison.Ordinal); => string.Equals(request.GrantType, GrantTypes.AuthorizationCode, StringComparison.Ordinal);
@ -343,7 +343,7 @@ public static class OpenIddictExtensions
/// See http://tools.ietf.org/html/rfc6749#section-4.4.2 for more information. /// See http://tools.ietf.org/html/rfc6749#section-4.4.2 for more information.
/// </summary> /// </summary>
/// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param> /// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param>
/// <returns><c>true</c> if the request is a client credentials grant request, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the request is a client credentials grant request, <see langword="false"/> otherwise.</returns>
public static bool IsClientCredentialsGrantType(this OpenIddictRequest request!!) public static bool IsClientCredentialsGrantType(this OpenIddictRequest request!!)
=> string.Equals(request.GrantType, GrantTypes.ClientCredentials, StringComparison.Ordinal); => string.Equals(request.GrantType, GrantTypes.ClientCredentials, StringComparison.Ordinal);
@ -352,7 +352,7 @@ public static class OpenIddictExtensions
/// See https://tools.ietf.org/html/rfc8628 for more information. /// See https://tools.ietf.org/html/rfc8628 for more information.
/// </summary> /// </summary>
/// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param> /// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param>
/// <returns><c>true</c> if the request is a device code grant request, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the request is a device code grant request, <see langword="false"/> otherwise.</returns>
public static bool IsDeviceCodeGrantType(this OpenIddictRequest request!!) public static bool IsDeviceCodeGrantType(this OpenIddictRequest request!!)
=> string.Equals(request.GrantType, GrantTypes.DeviceCode, StringComparison.Ordinal); => string.Equals(request.GrantType, GrantTypes.DeviceCode, StringComparison.Ordinal);
@ -361,7 +361,7 @@ public static class OpenIddictExtensions
/// See http://tools.ietf.org/html/rfc6749#section-4.3.2 for more information. /// See http://tools.ietf.org/html/rfc6749#section-4.3.2 for more information.
/// </summary> /// </summary>
/// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param> /// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param>
/// <returns><c>true</c> if the request is a password grant request, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the request is a password grant request, <see langword="false"/> otherwise.</returns>
public static bool IsPasswordGrantType(this OpenIddictRequest request!!) public static bool IsPasswordGrantType(this OpenIddictRequest request!!)
=> string.Equals(request.GrantType, GrantTypes.Password, StringComparison.Ordinal); => string.Equals(request.GrantType, GrantTypes.Password, StringComparison.Ordinal);
@ -370,7 +370,7 @@ public static class OpenIddictExtensions
/// See http://tools.ietf.org/html/rfc6749#section-6 for more information. /// See http://tools.ietf.org/html/rfc6749#section-6 for more information.
/// </summary> /// </summary>
/// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param> /// <param name="request">The <see cref="OpenIddictRequest"/> instance.</param>
/// <returns><c>true</c> if the request is a refresh token grant request, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the request is a refresh token grant request, <see langword="false"/> otherwise.</returns>
public static bool IsRefreshTokenGrantType(this OpenIddictRequest request!!) public static bool IsRefreshTokenGrantType(this OpenIddictRequest request!!)
=> string.Equals(request.GrantType, GrantTypes.RefreshToken, StringComparison.Ordinal); => string.Equals(request.GrantType, GrantTypes.RefreshToken, StringComparison.Ordinal);
@ -551,8 +551,8 @@ public static class OpenIddictExtensions
/// </summary> /// </summary>
/// <param name="identity">The <see cref="ClaimsIdentity"/> instance to filter.</param> /// <param name="identity">The <see cref="ClaimsIdentity"/> instance to filter.</param>
/// <param name="filter"> /// <param name="filter">
/// The delegate filtering the claims: return <c>true</c> /// The delegate filtering the claims: return <see langword="true"/>
/// to accept the claim, <c>false</c> to remove it. /// to accept the claim, <see langword="false"/> to remove it.
/// </param> /// </param>
public static ClaimsIdentity Clone(this ClaimsIdentity identity!!, Func<Claim, bool> filter!!) public static ClaimsIdentity Clone(this ClaimsIdentity identity!!, Func<Claim, bool> filter!!)
{ {
@ -581,8 +581,8 @@ public static class OpenIddictExtensions
/// </summary> /// </summary>
/// <param name="principal">The <see cref="ClaimsPrincipal"/> instance to filter.</param> /// <param name="principal">The <see cref="ClaimsPrincipal"/> instance to filter.</param>
/// <param name="filter"> /// <param name="filter">
/// The delegate filtering the claims: return <c>true</c> /// The delegate filtering the claims: return <see langword="true"/>
/// to accept the claim, <c>false</c> to remove it. /// to accept the claim, <see langword="false"/> to remove it.
/// </param> /// </param>
public static ClaimsPrincipal Clone(this ClaimsPrincipal principal!!, Func<Claim, bool> filter!!) public static ClaimsPrincipal Clone(this ClaimsPrincipal principal!!, Func<Claim, bool> filter!!)
{ {
@ -704,7 +704,7 @@ public static class OpenIddictExtensions
/// </summary> /// </summary>
/// <param name="identity">The claims identity.</param> /// <param name="identity">The claims identity.</param>
/// <param name="type">The claim type.</param> /// <param name="type">The claim type.</param>
/// <returns><c>true</c> if the identity contains at least one claim of the specified type.</returns> /// <returns><see langword="true"/> if the identity contains at least one claim of the specified type.</returns>
public static bool HasClaim(this ClaimsIdentity identity!!, string type) public static bool HasClaim(this ClaimsIdentity identity!!, string type)
{ {
if (string.IsNullOrEmpty(type)) if (string.IsNullOrEmpty(type))
@ -736,7 +736,7 @@ public static class OpenIddictExtensions
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <param name="type">The claim type.</param> /// <param name="type">The claim type.</param>
/// <returns><c>true</c> if the principal contains at least one claim of the specified type.</returns> /// <returns><see langword="true"/> if the principal contains at least one claim of the specified type.</returns>
public static bool HasClaim(this ClaimsPrincipal principal!!, string type) public static bool HasClaim(this ClaimsPrincipal principal!!, string type)
{ {
if (string.IsNullOrEmpty(type)) if (string.IsNullOrEmpty(type))
@ -902,7 +902,7 @@ public static class OpenIddictExtensions
/// Gets the creation date stored in the claims principal. /// Gets the creation date stored in the claims principal.
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <returns>The creation date or <c>null</c> if the claim cannot be found.</returns> /// <returns>The creation date or <see langword="null"/> if the claim cannot be found.</returns>
public static DateTimeOffset? GetCreationDate(this ClaimsPrincipal principal!!) public static DateTimeOffset? GetCreationDate(this ClaimsPrincipal principal!!)
{ {
var claim = principal.FindFirst(Claims.Private.CreationDate); var claim = principal.FindFirst(Claims.Private.CreationDate);
@ -923,7 +923,7 @@ public static class OpenIddictExtensions
/// Gets the expiration date stored in the claims principal. /// Gets the expiration date stored in the claims principal.
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <returns>The expiration date or <c>null</c> if the claim cannot be found.</returns> /// <returns>The expiration date or <see langword="null"/> if the claim cannot be found.</returns>
public static DateTimeOffset? GetExpirationDate(this ClaimsPrincipal principal!!) public static DateTimeOffset? GetExpirationDate(this ClaimsPrincipal principal!!)
{ {
var claim = principal.FindFirst(Claims.Private.ExpirationDate); var claim = principal.FindFirst(Claims.Private.ExpirationDate);
@ -976,7 +976,7 @@ public static class OpenIddictExtensions
/// Gets the access token lifetime associated with the claims principal. /// Gets the access token lifetime associated with the claims principal.
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <returns>The access token lifetime or <c>null</c> if the claim cannot be found.</returns> /// <returns>The access token lifetime or <see langword="null"/> if the claim cannot be found.</returns>
public static TimeSpan? GetAccessTokenLifetime(this ClaimsPrincipal principal) public static TimeSpan? GetAccessTokenLifetime(this ClaimsPrincipal principal)
=> GetLifetime(principal, Claims.Private.AccessTokenLifetime); => GetLifetime(principal, Claims.Private.AccessTokenLifetime);
@ -984,7 +984,7 @@ public static class OpenIddictExtensions
/// Gets the authorization code lifetime associated with the claims principal. /// Gets the authorization code lifetime associated with the claims principal.
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <returns>The authorization code lifetime or <c>null</c> if the claim cannot be found.</returns> /// <returns>The authorization code lifetime or <see langword="null"/> if the claim cannot be found.</returns>
public static TimeSpan? GetAuthorizationCodeLifetime(this ClaimsPrincipal principal) public static TimeSpan? GetAuthorizationCodeLifetime(this ClaimsPrincipal principal)
=> GetLifetime(principal, Claims.Private.AuthorizationCodeLifetime); => GetLifetime(principal, Claims.Private.AuthorizationCodeLifetime);
@ -992,7 +992,7 @@ public static class OpenIddictExtensions
/// Gets the device code lifetime associated with the claims principal. /// Gets the device code lifetime associated with the claims principal.
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <returns>The device code lifetime or <c>null</c> if the claim cannot be found.</returns> /// <returns>The device code lifetime or <see langword="null"/> if the claim cannot be found.</returns>
public static TimeSpan? GetDeviceCodeLifetime(this ClaimsPrincipal principal) public static TimeSpan? GetDeviceCodeLifetime(this ClaimsPrincipal principal)
=> GetLifetime(principal, Claims.Private.DeviceCodeLifetime); => GetLifetime(principal, Claims.Private.DeviceCodeLifetime);
@ -1000,7 +1000,7 @@ public static class OpenIddictExtensions
/// Gets the identity token lifetime associated with the claims principal. /// Gets the identity token lifetime associated with the claims principal.
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <returns>The identity token lifetime or <c>null</c> if the claim cannot be found.</returns> /// <returns>The identity token lifetime or <see langword="null"/> if the claim cannot be found.</returns>
public static TimeSpan? GetIdentityTokenLifetime(this ClaimsPrincipal principal) public static TimeSpan? GetIdentityTokenLifetime(this ClaimsPrincipal principal)
=> GetLifetime(principal, Claims.Private.IdentityTokenLifetime); => GetLifetime(principal, Claims.Private.IdentityTokenLifetime);
@ -1008,7 +1008,7 @@ public static class OpenIddictExtensions
/// Gets the refresh token lifetime associated with the claims principal. /// Gets the refresh token lifetime associated with the claims principal.
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <returns>The refresh token lifetime or <c>null</c> if the claim cannot be found.</returns> /// <returns>The refresh token lifetime or <see langword="null"/> if the claim cannot be found.</returns>
public static TimeSpan? GetRefreshTokenLifetime(this ClaimsPrincipal principal) public static TimeSpan? GetRefreshTokenLifetime(this ClaimsPrincipal principal)
=> GetLifetime(principal, Claims.Private.RefreshTokenLifetime); => GetLifetime(principal, Claims.Private.RefreshTokenLifetime);
@ -1016,7 +1016,7 @@ public static class OpenIddictExtensions
/// Gets the state token lifetime associated with the claims principal. /// Gets the state token lifetime associated with the claims principal.
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <returns>The state token lifetime or <c>null</c> if the claim cannot be found.</returns> /// <returns>The state token lifetime or <see langword="null"/> if the claim cannot be found.</returns>
public static TimeSpan? GetStateTokenLifetime(this ClaimsPrincipal principal) public static TimeSpan? GetStateTokenLifetime(this ClaimsPrincipal principal)
=> GetLifetime(principal, Claims.Private.StateTokenLifetime); => GetLifetime(principal, Claims.Private.StateTokenLifetime);
@ -1024,7 +1024,7 @@ public static class OpenIddictExtensions
/// Gets the user code lifetime associated with the claims principal. /// Gets the user code lifetime associated with the claims principal.
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <returns>The user code lifetime or <c>null</c> if the claim cannot be found.</returns> /// <returns>The user code lifetime or <see langword="null"/> if the claim cannot be found.</returns>
public static TimeSpan? GetUserCodeLifetime(this ClaimsPrincipal principal) public static TimeSpan? GetUserCodeLifetime(this ClaimsPrincipal principal)
=> GetLifetime(principal, Claims.Private.UserCodeLifetime); => GetLifetime(principal, Claims.Private.UserCodeLifetime);
@ -1032,7 +1032,7 @@ public static class OpenIddictExtensions
/// Gets the internal authorization identifier associated with the claims principal. /// Gets the internal authorization identifier associated with the claims principal.
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <returns>The unique identifier or <c>null</c> if the claim cannot be found.</returns> /// <returns>The unique identifier or <see langword="null"/> if the claim cannot be found.</returns>
public static string? GetAuthorizationId(this ClaimsPrincipal principal) public static string? GetAuthorizationId(this ClaimsPrincipal principal)
=> principal.GetClaim(Claims.Private.AuthorizationId); => principal.GetClaim(Claims.Private.AuthorizationId);
@ -1040,7 +1040,7 @@ public static class OpenIddictExtensions
/// Gets the internal token identifier associated with the claims principal. /// Gets the internal token identifier associated with the claims principal.
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <returns>The unique identifier or <c>null</c> if the claim cannot be found.</returns> /// <returns>The unique identifier or <see langword="null"/> if the claim cannot be found.</returns>
public static string? GetTokenId(this ClaimsPrincipal principal) public static string? GetTokenId(this ClaimsPrincipal principal)
=> principal.GetClaim(Claims.Private.TokenId); => principal.GetClaim(Claims.Private.TokenId);
@ -1048,7 +1048,7 @@ public static class OpenIddictExtensions
/// Gets the token type associated with the claims principal. /// Gets the token type associated with the claims principal.
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <returns>The token type or <c>null</c> if the claim cannot be found.</returns> /// <returns>The token type or <see langword="null"/> if the claim cannot be found.</returns>
public static string? GetTokenType(this ClaimsPrincipal principal) public static string? GetTokenType(this ClaimsPrincipal principal)
=> principal.GetClaim(Claims.Private.TokenType); => principal.GetClaim(Claims.Private.TokenType);
@ -1057,7 +1057,7 @@ public static class OpenIddictExtensions
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <param name="audience">The audience.</param> /// <param name="audience">The audience.</param>
/// <returns><c>true</c> if the principal contains the given audience.</returns> /// <returns><see langword="true"/> if the principal contains the given audience.</returns>
public static bool HasAudience(this ClaimsPrincipal principal!!, string audience) public static bool HasAudience(this ClaimsPrincipal principal!!, string audience)
{ {
if (string.IsNullOrEmpty(audience)) if (string.IsNullOrEmpty(audience))
@ -1073,7 +1073,7 @@ public static class OpenIddictExtensions
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <param name="presenter">The presenter.</param> /// <param name="presenter">The presenter.</param>
/// <returns><c>true</c> if the principal contains the given presenter.</returns> /// <returns><see langword="true"/> if the principal contains the given presenter.</returns>
public static bool HasPresenter(this ClaimsPrincipal principal!!, string presenter) public static bool HasPresenter(this ClaimsPrincipal principal!!, string presenter)
{ {
if (string.IsNullOrEmpty(presenter)) if (string.IsNullOrEmpty(presenter))
@ -1089,7 +1089,7 @@ public static class OpenIddictExtensions
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <param name="resource">The resource.</param> /// <param name="resource">The resource.</param>
/// <returns><c>true</c> if the principal contains the given resource.</returns> /// <returns><see langword="true"/> if the principal contains the given resource.</returns>
public static bool HasResource(this ClaimsPrincipal principal!!, string resource) public static bool HasResource(this ClaimsPrincipal principal!!, string resource)
{ {
if (string.IsNullOrEmpty(resource)) if (string.IsNullOrEmpty(resource))
@ -1105,7 +1105,7 @@ public static class OpenIddictExtensions
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <param name="scope">The scope.</param> /// <param name="scope">The scope.</param>
/// <returns><c>true</c> if the principal contains the given scope.</returns> /// <returns><see langword="true"/> if the principal contains the given scope.</returns>
public static bool HasScope(this ClaimsPrincipal principal!!, string scope) public static bool HasScope(this ClaimsPrincipal principal!!, string scope)
{ {
if (string.IsNullOrEmpty(scope)) if (string.IsNullOrEmpty(scope))
@ -1121,7 +1121,7 @@ public static class OpenIddictExtensions
/// </summary> /// </summary>
/// <param name="principal">The claims principal.</param> /// <param name="principal">The claims principal.</param>
/// <param name="type">The token type.</param> /// <param name="type">The token type.</param>
/// <returns><c>true</c> if the token type matches the specified type.</returns> /// <returns><see langword="true"/> if the token type matches the specified type.</returns>
public static bool HasTokenType(this ClaimsPrincipal principal!!, string type) public static bool HasTokenType(this ClaimsPrincipal principal!!, string type)
{ {
if (string.IsNullOrEmpty(type)) if (string.IsNullOrEmpty(type))

6
src/OpenIddict.Abstractions/Primitives/OpenIddictMessage.cs

@ -218,7 +218,7 @@ public class OpenIddictMessage
/// Gets the value corresponding to a given parameter. /// Gets the value corresponding to a given parameter.
/// </summary> /// </summary>
/// <param name="name">The parameter name.</param> /// <param name="name">The parameter name.</param>
/// <returns>The parameter value, or <c>null</c> if it cannot be found.</returns> /// <returns>The parameter value, or <see langword="null"/> if it cannot be found.</returns>
public OpenIddictParameter? GetParameter(string name) public OpenIddictParameter? GetParameter(string name)
{ {
if (string.IsNullOrEmpty(name)) if (string.IsNullOrEmpty(name))
@ -245,7 +245,7 @@ public class OpenIddictMessage
/// Determines whether the current message contains the specified parameter. /// Determines whether the current message contains the specified parameter.
/// </summary> /// </summary>
/// <param name="name">The parameter name.</param> /// <param name="name">The parameter name.</param>
/// <returns><c>true</c> if the parameter is present, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the parameter is present, <see langword="false"/> otherwise.</returns>
public bool HasParameter(string name) public bool HasParameter(string name)
{ {
if (string.IsNullOrEmpty(name)) if (string.IsNullOrEmpty(name))
@ -306,7 +306,7 @@ public class OpenIddictMessage
/// </summary> /// </summary>
/// <param name="name">The parameter name.</param> /// <param name="name">The parameter name.</param>
/// <param name="value">The parameter value.</param> /// <param name="value">The parameter value.</param>
/// <returns><c>true</c> if the parameter could be found, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the parameter could be found, <see langword="false"/> otherwise.</returns>
public bool TryGetParameter(string name, out OpenIddictParameter value) public bool TryGetParameter(string name, out OpenIddictParameter value)
{ {
if (string.IsNullOrEmpty(name)) if (string.IsNullOrEmpty(name))

18
src/OpenIddict.Abstractions/Primitives/OpenIddictParameter.cs

@ -76,8 +76,8 @@ public readonly struct OpenIddictParameter : IEquatable<OpenIddictParameter>
public OpenIddictParameter? this[string name] => GetNamedParameter(name); public OpenIddictParameter? this[string name] => GetNamedParameter(name);
/// <summary> /// <summary>
/// Gets the number of unnamed child items contained in the current parameter or /// Gets the number of unnamed child items contained in the current parameter
/// <c>0</c> if the parameter doesn't represent an array of strings or a JSON array. /// or 0 if the parameter doesn't represent an array of strings or a JSON array.
/// </summary> /// </summary>
public int Count => Value switch public int Count => Value switch
{ {
@ -103,7 +103,7 @@ public readonly struct OpenIddictParameter : IEquatable<OpenIddictParameter>
/// instance is equal to the specified <see cref="OpenIddictParameter"/>. /// instance is equal to the specified <see cref="OpenIddictParameter"/>.
/// </summary> /// </summary>
/// <param name="other">The other object to which to compare this instance.</param> /// <param name="other">The other object to which to compare this instance.</param>
/// <returns><c>true</c> if the two instances are equal, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the two instances are equal, <see langword="false"/> otherwise.</returns>
public bool Equals(OpenIddictParameter other) public bool Equals(OpenIddictParameter other)
{ {
return (left: Value, right: other.Value) switch return (left: Value, right: other.Value) switch
@ -214,7 +214,7 @@ public readonly struct OpenIddictParameter : IEquatable<OpenIddictParameter>
/// instance is equal to the specified <see cref="object"/>. /// instance is equal to the specified <see cref="object"/>.
/// </summary> /// </summary>
/// <param name="obj">The other object to which to compare this instance.</param> /// <param name="obj">The other object to which to compare this instance.</param>
/// <returns><c>true</c> if the two instances are equal, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the two instances are equal, <see langword="false"/> otherwise.</returns>
public override bool Equals(object? obj) => obj is OpenIddictParameter parameter && Equals(parameter); public override bool Equals(object? obj) => obj is OpenIddictParameter parameter && Equals(parameter);
/// <summary> /// <summary>
@ -431,7 +431,7 @@ public readonly struct OpenIddictParameter : IEquatable<OpenIddictParameter>
/// </summary> /// </summary>
/// <param name="name">The name of the child item.</param> /// <param name="name">The name of the child item.</param>
/// <param name="value">An <see cref="OpenIddictParameter"/> instance containing the item value.</param> /// <param name="value">An <see cref="OpenIddictParameter"/> instance containing the item value.</param>
/// <returns><c>true</c> if the parameter could be found, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the parameter could be found, <see langword="false"/> otherwise.</returns>
public bool TryGetNamedParameter(string name, out OpenIddictParameter value) public bool TryGetNamedParameter(string name, out OpenIddictParameter value)
{ {
if (string.IsNullOrEmpty(name)) if (string.IsNullOrEmpty(name))
@ -457,7 +457,7 @@ public readonly struct OpenIddictParameter : IEquatable<OpenIddictParameter>
/// </summary> /// </summary>
/// <param name="index">The index of the child item.</param> /// <param name="index">The index of the child item.</param>
/// <param name="value">An <see cref="OpenIddictParameter"/> instance containing the item value.</param> /// <param name="value">An <see cref="OpenIddictParameter"/> instance containing the item value.</param>
/// <returns><c>true</c> if the parameter could be found, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the parameter could be found, <see langword="false"/> otherwise.</returns>
public bool TryGetUnnamedParameter(int index, out OpenIddictParameter value) public bool TryGetUnnamedParameter(int index, out OpenIddictParameter value)
{ {
if (index < 0) if (index < 0)
@ -548,7 +548,7 @@ public readonly struct OpenIddictParameter : IEquatable<OpenIddictParameter>
/// </summary> /// </summary>
/// <param name="left">The first instance.</param> /// <param name="left">The first instance.</param>
/// <param name="right">The second instance.</param> /// <param name="right">The second instance.</param>
/// <returns><c>true</c> if the two instances are equal, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the two instances are equal, <see langword="false"/> otherwise.</returns>
public static bool operator ==(OpenIddictParameter left, OpenIddictParameter right) => left.Equals(right); public static bool operator ==(OpenIddictParameter left, OpenIddictParameter right) => left.Equals(right);
/// <summary> /// <summary>
@ -556,7 +556,7 @@ public readonly struct OpenIddictParameter : IEquatable<OpenIddictParameter>
/// </summary> /// </summary>
/// <param name="left">The first instance.</param> /// <param name="left">The first instance.</param>
/// <param name="right">The second instance.</param> /// <param name="right">The second instance.</param>
/// <returns><c>true</c> if the two instances are not equal, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the two instances are not equal, <see langword="false"/> otherwise.</returns>
public static bool operator !=(OpenIddictParameter left, OpenIddictParameter right) => !left.Equals(right); public static bool operator !=(OpenIddictParameter left, OpenIddictParameter right) => !left.Equals(right);
/// <summary> /// <summary>
@ -863,7 +863,7 @@ public readonly struct OpenIddictParameter : IEquatable<OpenIddictParameter>
/// Determines whether a parameter is null or empty. /// Determines whether a parameter is null or empty.
/// </summary> /// </summary>
/// <param name="parameter">The parameter.</param> /// <param name="parameter">The parameter.</param>
/// <returns><c>true</c> if the parameter is null or empty, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the parameter is null or empty, <see langword="false"/> otherwise.</returns>
public static bool IsNullOrEmpty(OpenIddictParameter parameter) public static bool IsNullOrEmpty(OpenIddictParameter parameter)
{ {
return parameter.Value switch return parameter.Value switch

2
src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreBuilder.cs

@ -78,7 +78,7 @@ public class OpenIddictClientAspNetCoreBuilder
/// Determines whether the specified object is equal to the current object. /// Determines whether the specified object is equal to the current object.
/// </summary> /// </summary>
/// <param name="obj">The object to compare with the current object.</param> /// <param name="obj">The object to compare with the current object.</param>
/// <returns><c>true</c> if the specified object is equal to the current object; otherwise, false.</returns> /// <returns><see langword="true"/> if the specified object is equal to the current object; otherwise, false.</returns>
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => base.Equals(obj); public override bool Equals(object? obj) => base.Equals(obj);

6
src/OpenIddict.Client.AspNetCore/OpenIddictClientAspNetCoreHelpers.cs

@ -18,7 +18,7 @@ public static class OpenIddictClientAspNetCoreHelpers
/// Retrieves the <see cref="HttpRequest"/> instance stored in the <see cref="OpenIddictClientTransaction"/> properties. /// Retrieves the <see cref="HttpRequest"/> instance stored in the <see cref="OpenIddictClientTransaction"/> properties.
/// </summary> /// </summary>
/// <param name="transaction">The transaction instance.</param> /// <param name="transaction">The transaction instance.</param>
/// <returns>The <see cref="HttpRequest"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="HttpRequest"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static HttpRequest? GetHttpRequest(this OpenIddictClientTransaction transaction!!) public static HttpRequest? GetHttpRequest(this OpenIddictClientTransaction transaction!!)
{ {
if (!transaction.Properties.TryGetValue(typeof(HttpRequest).FullName!, out object? property)) if (!transaction.Properties.TryGetValue(typeof(HttpRequest).FullName!, out object? property))
@ -48,7 +48,7 @@ public static class OpenIddictClientAspNetCoreHelpers
/// Retrieves the <see cref="OpenIddictRequest"/> instance stored in <see cref="BaseContext"/>. /// Retrieves the <see cref="OpenIddictRequest"/> instance stored in <see cref="BaseContext"/>.
/// </summary> /// </summary>
/// <param name="context">The context instance.</param> /// <param name="context">The context instance.</param>
/// <returns>The <see cref="OpenIddictRequest"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="OpenIddictRequest"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static OpenIddictRequest? GetOpenIddictClientRequest(this HttpContext context!!) public static OpenIddictRequest? GetOpenIddictClientRequest(this HttpContext context!!)
{ {
return context.Features.Get<OpenIddictClientAspNetCoreFeature>()?.Transaction?.Request; return context.Features.Get<OpenIddictClientAspNetCoreFeature>()?.Transaction?.Request;
@ -58,7 +58,7 @@ public static class OpenIddictClientAspNetCoreHelpers
/// Retrieves the <see cref="OpenIddictResponse"/> instance stored in <see cref="BaseContext"/>. /// Retrieves the <see cref="OpenIddictResponse"/> instance stored in <see cref="BaseContext"/>.
/// </summary> /// </summary>
/// <param name="context">The context instance.</param> /// <param name="context">The context instance.</param>
/// <returns>The <see cref="OpenIddictResponse"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="OpenIddictResponse"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static OpenIddictResponse? GetOpenIddictClientResponse(this HttpContext context!!) public static OpenIddictResponse? GetOpenIddictClientResponse(this HttpContext context!!)
{ {
return context.Features.Get<OpenIddictClientAspNetCoreFeature>()?.Transaction?.Response; return context.Features.Get<OpenIddictClientAspNetCoreFeature>()?.Transaction?.Response;

2
src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpBuilder.cs

@ -53,7 +53,7 @@ public class OpenIddictClientSystemNetHttpBuilder
/// Determines whether the specified object is equal to the current object. /// Determines whether the specified object is equal to the current object.
/// </summary> /// </summary>
/// <param name="obj">The object to compare with the current object.</param> /// <param name="obj">The object to compare with the current object.</param>
/// <returns><c>true</c> if the specified object is equal to the current object; otherwise, false.</returns> /// <returns><see langword="true"/> if the specified object is equal to the current object; otherwise, false.</returns>
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => base.Equals(obj); public override bool Equals(object? obj) => base.Equals(obj);

4
src/OpenIddict.Client.SystemNetHttp/OpenIddictClientSystemNetHttpHelpers.cs

@ -17,7 +17,7 @@ public static class OpenIddictClientSystemNetHttpHelpers
/// Gets the <see cref="HttpRequestMessage"/> associated with the current context. /// Gets the <see cref="HttpRequestMessage"/> associated with the current context.
/// </summary> /// </summary>
/// <param name="transaction">The transaction instance.</param> /// <param name="transaction">The transaction instance.</param>
/// <returns>The <see cref="HttpRequestMessage"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="HttpRequestMessage"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static HttpRequestMessage? GetHttpRequestMessage(this OpenIddictClientTransaction transaction) public static HttpRequestMessage? GetHttpRequestMessage(this OpenIddictClientTransaction transaction)
=> transaction.GetProperty<HttpRequestMessage>(typeof(HttpRequestMessage).FullName!); => transaction.GetProperty<HttpRequestMessage>(typeof(HttpRequestMessage).FullName!);
@ -25,7 +25,7 @@ public static class OpenIddictClientSystemNetHttpHelpers
/// Gets the <see cref="HttpResponseMessage"/> associated with the current context. /// Gets the <see cref="HttpResponseMessage"/> associated with the current context.
/// </summary> /// </summary>
/// <param name="transaction">The transaction instance.</param> /// <param name="transaction">The transaction instance.</param>
/// <returns>The <see cref="HttpResponseMessage"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="HttpResponseMessage"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static HttpResponseMessage? GetHttpResponseMessage(this OpenIddictClientTransaction transaction) public static HttpResponseMessage? GetHttpResponseMessage(this OpenIddictClientTransaction transaction)
=> transaction.GetProperty<HttpResponseMessage>(typeof(HttpResponseMessage).FullName!); => transaction.GetProperty<HttpResponseMessage>(typeof(HttpResponseMessage).FullName!);
} }

8
src/OpenIddict.Client/OpenIddictClientBuilder.cs

@ -122,7 +122,7 @@ public class OpenIddictClientBuilder
{ {
// If the encryption key is an asymmetric security key, ensure it has a private key. // If the encryption key is an asymmetric security key, ensure it has a private key.
if (key is AsymmetricSecurityKey asymmetricSecurityKey && if (key is AsymmetricSecurityKey asymmetricSecurityKey &&
asymmetricSecurityKey.PrivateKeyStatus == PrivateKeyStatus.DoesNotExist) asymmetricSecurityKey.PrivateKeyStatus is PrivateKeyStatus.DoesNotExist)
{ {
throw new InvalidOperationException(SR.GetResourceString(SR.ID0055)); throw new InvalidOperationException(SR.GetResourceString(SR.ID0055));
} }
@ -482,7 +482,7 @@ public class OpenIddictClientBuilder
{ {
// If the signing key is an asymmetric security key, ensure it has a private key. // If the signing key is an asymmetric security key, ensure it has a private key.
if (key is AsymmetricSecurityKey asymmetricSecurityKey && if (key is AsymmetricSecurityKey asymmetricSecurityKey &&
asymmetricSecurityKey.PrivateKeyStatus == PrivateKeyStatus.DoesNotExist) asymmetricSecurityKey.PrivateKeyStatus is PrivateKeyStatus.DoesNotExist)
{ {
throw new InvalidOperationException(SR.GetResourceString(SR.ID0067)); throw new InvalidOperationException(SR.GetResourceString(SR.ID0067));
} }
@ -909,7 +909,7 @@ public class OpenIddictClientBuilder
/// Sets the state token lifetime, after which authorization callbacks /// Sets the state token lifetime, after which authorization callbacks
/// using an expired state token will be automatically rejected by OpenIddict. /// using an expired state token will be automatically rejected by OpenIddict.
/// Using long-lived state tokens or tokens that never expire is not recommended. /// Using long-lived state tokens or tokens that never expire is not recommended.
/// While discouraged, <c>null</c> can be specified to issue tokens that never expire. /// While discouraged, <see langword="null"/> can be specified to issue tokens that never expire.
/// </summary> /// </summary>
/// <param name="lifetime">The access token lifetime.</param> /// <param name="lifetime">The access token lifetime.</param>
/// <returns>The <see cref="OpenIddictClientBuilder"/>.</returns> /// <returns>The <see cref="OpenIddictClientBuilder"/>.</returns>
@ -920,7 +920,7 @@ public class OpenIddictClientBuilder
/// Determines whether the specified object is equal to the current object. /// Determines whether the specified object is equal to the current object.
/// </summary> /// </summary>
/// <param name="obj">The object to compare with the current object.</param> /// <param name="obj">The object to compare with the current object.</param>
/// <returns><c>true</c> if the specified object is equal to the current object; otherwise, false.</returns> /// <returns><see langword="true"/> if the specified object is equal to the current object; otherwise, false.</returns>
[EditorBrowsable(EditorBrowsableState.Never)] [EditorBrowsable(EditorBrowsableState.Never)]
public override bool Equals(object? obj) => base.Equals(obj); public override bool Equals(object? obj) => base.Equals(obj);

4
src/OpenIddict.Client/OpenIddictClientEvents.Authentication.cs

@ -80,7 +80,7 @@ public static partial class OpenIddictClientEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request or <c>null</c> if it was extracted yet. /// Gets or sets the request or <see langword="null"/> if it was extracted yet.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -170,7 +170,7 @@ public static partial class OpenIddictClientEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {

4
src/OpenIddict.Client/OpenIddictClientEvents.Discovery.cs

@ -82,7 +82,7 @@ public static partial class OpenIddictClientEvents
} }
/// <summary> /// <summary>
/// Gets or sets the response, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the response, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictResponse? Response public OpenIddictResponse? Response
{ {
@ -200,7 +200,7 @@ public static partial class OpenIddictClientEvents
} }
/// <summary> /// <summary>
/// Gets or sets the response, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the response, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictResponse? Response public OpenIddictResponse? Response
{ {

2
src/OpenIddict.Client/OpenIddictClientEvents.Exchange.cs

@ -92,7 +92,7 @@ public static partial class OpenIddictClientEvents
} }
/// <summary> /// <summary>
/// Gets or sets the response, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the response, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictResponse? Response public OpenIddictResponse? Response
{ {

4
src/OpenIddict.Client/OpenIddictClientEvents.Protection.cs

@ -26,7 +26,7 @@ public static partial class OpenIddictClientEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it is not available. /// Gets or sets the request, or <see langword="null"/> if it is not available.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -79,7 +79,7 @@ public static partial class OpenIddictClientEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it is not available. /// Gets or sets the request, or <see langword="null"/> if it is not available.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {

2
src/OpenIddict.Client/OpenIddictClientEvents.Userinfo.cs

@ -82,7 +82,7 @@ public static partial class OpenIddictClientEvents
} }
/// <summary> /// <summary>
/// Gets or sets the response, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the response, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictResponse? Response public OpenIddictResponse? Response
{ {

4
src/OpenIddict.Client/OpenIddictClientEvents.cs

@ -224,7 +224,7 @@ public static partial class OpenIddictClientEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -709,7 +709,7 @@ public static partial class OpenIddictClientEvents
/// <summary> /// <summary>
/// Gets or sets the generated state token, if applicable. /// Gets or sets the generated state token, if applicable.
/// The access token will only be returned if /// The access token will only be returned if
/// <see cref="IncludeStateToken"/> is set to <c>true</c>. /// <see cref="IncludeStateToken"/> is set to <see langword="true"/>.
/// </summary> /// </summary>
public string? StateToken { get; set; } public string? StateToken { get; set; }

2
src/OpenIddict.Client/OpenIddictClientHelpers.cs

@ -17,7 +17,7 @@ public static class OpenIddictClientHelpers
/// <typeparam name="TProperty">The type of the property.</typeparam> /// <typeparam name="TProperty">The type of the property.</typeparam>
/// <param name="transaction">The client transaction.</param> /// <param name="transaction">The client transaction.</param>
/// <param name="name">The property name.</param> /// <param name="name">The property name.</param>
/// <returns>The property value or <c>null</c> if it couldn't be found.</returns> /// <returns>The property value or <see langword="null"/> if it couldn't be found.</returns>
public static TProperty? GetProperty<TProperty>( public static TProperty? GetProperty<TProperty>(
this OpenIddictClientTransaction transaction!!, string name) where TProperty : class this OpenIddictClientTransaction transaction!!, string name) where TProperty : class
{ {

10
src/OpenIddict.Core/Managers/OpenIddictApplicationManager.cs

@ -535,7 +535,7 @@ public class OpenIddictApplicationManager<TApplication> : IOpenIddictApplication
TApplication application!!, CultureInfo culture!!, CancellationToken cancellationToken = default) TApplication application!!, CultureInfo culture!!, CancellationToken cancellationToken = default)
{ {
var names = await Store.GetDisplayNamesAsync(application, cancellationToken); var names = await Store.GetDisplayNamesAsync(application, cancellationToken);
if (names is not { IsEmpty: false }) if (names is not { Count: > 0 })
{ {
return await Store.GetDisplayNameAsync(application, cancellationToken); return await Store.GetDisplayNameAsync(application, cancellationToken);
} }
@ -626,7 +626,7 @@ public class OpenIddictApplicationManager<TApplication> : IOpenIddictApplication
/// <param name="application">The application.</param> /// <param name="application">The application.</param>
/// <param name="type">The expected client type.</param> /// <param name="type">The expected client type.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the application has the specified client type, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the application has the specified client type, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> HasClientTypeAsync( public virtual async ValueTask<bool> HasClientTypeAsync(
TApplication application!!, string type, CancellationToken cancellationToken = default) TApplication application!!, string type, CancellationToken cancellationToken = default)
{ {
@ -644,7 +644,7 @@ public class OpenIddictApplicationManager<TApplication> : IOpenIddictApplication
/// <param name="application">The application.</param> /// <param name="application">The application.</param>
/// <param name="type">The expected consent type.</param> /// <param name="type">The expected consent type.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the application has the specified consent type, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the application has the specified consent type, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> HasConsentTypeAsync( public virtual async ValueTask<bool> HasConsentTypeAsync(
TApplication application!!, string type, CancellationToken cancellationToken = default) TApplication application!!, string type, CancellationToken cancellationToken = default)
{ {
@ -662,7 +662,7 @@ public class OpenIddictApplicationManager<TApplication> : IOpenIddictApplication
/// <param name="application">The application.</param> /// <param name="application">The application.</param>
/// <param name="permission">The permission.</param> /// <param name="permission">The permission.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the application has been granted the specified permission, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the application has been granted the specified permission, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> HasPermissionAsync( public virtual async ValueTask<bool> HasPermissionAsync(
TApplication application!!, string permission, CancellationToken cancellationToken = default) TApplication application!!, string permission, CancellationToken cancellationToken = default)
{ {
@ -680,7 +680,7 @@ public class OpenIddictApplicationManager<TApplication> : IOpenIddictApplication
/// <param name="application">The application.</param> /// <param name="application">The application.</param>
/// <param name="requirement">The requirement.</param> /// <param name="requirement">The requirement.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the requirement has been enforced for the specified application, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the requirement has been enforced for the specified application, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> HasRequirementAsync( public virtual async ValueTask<bool> HasRequirementAsync(
TApplication application!!, string requirement, CancellationToken cancellationToken = default) TApplication application!!, string requirement, CancellationToken cancellationToken = default)
{ {

8
src/OpenIddict.Core/Managers/OpenIddictAuthorizationManager.cs

@ -714,7 +714,7 @@ public class OpenIddictAuthorizationManager<TAuthorization> : IOpenIddictAuthori
/// <param name="authorization">The authorization.</param> /// <param name="authorization">The authorization.</param>
/// <param name="scopes">The scopes.</param> /// <param name="scopes">The scopes.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the scopes are included in the authorization, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the scopes are included in the authorization, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> HasScopesAsync(TAuthorization authorization!!, public virtual async ValueTask<bool> HasScopesAsync(TAuthorization authorization!!,
ImmutableArray<string> scopes, CancellationToken cancellationToken = default) ImmutableArray<string> scopes, CancellationToken cancellationToken = default)
=> new HashSet<string>(await Store.GetScopesAsync( => new HashSet<string>(await Store.GetScopesAsync(
@ -726,7 +726,7 @@ public class OpenIddictAuthorizationManager<TAuthorization> : IOpenIddictAuthori
/// <param name="authorization">The authorization.</param> /// <param name="authorization">The authorization.</param>
/// <param name="status">The expected status.</param> /// <param name="status">The expected status.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the authorization has the specified status, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the authorization has the specified status, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> HasStatusAsync(TAuthorization authorization!!, public virtual async ValueTask<bool> HasStatusAsync(TAuthorization authorization!!,
string status, CancellationToken cancellationToken = default) string status, CancellationToken cancellationToken = default)
{ {
@ -744,7 +744,7 @@ public class OpenIddictAuthorizationManager<TAuthorization> : IOpenIddictAuthori
/// <param name="authorization">The authorization.</param> /// <param name="authorization">The authorization.</param>
/// <param name="type">The expected type.</param> /// <param name="type">The expected type.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the authorization has the specified type, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the authorization has the specified type, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> HasTypeAsync( public virtual async ValueTask<bool> HasTypeAsync(
TAuthorization authorization!!, string type, CancellationToken cancellationToken = default) TAuthorization authorization!!, string type, CancellationToken cancellationToken = default)
{ {
@ -862,7 +862,7 @@ public class OpenIddictAuthorizationManager<TAuthorization> : IOpenIddictAuthori
/// </summary> /// </summary>
/// <param name="authorization">The authorization to revoke.</param> /// <param name="authorization">The authorization to revoke.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the authorization was successfully revoked, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the authorization was successfully revoked, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> TryRevokeAsync(TAuthorization authorization!!, CancellationToken cancellationToken = default) public virtual async ValueTask<bool> TryRevokeAsync(TAuthorization authorization!!, CancellationToken cancellationToken = default)
{ {
var status = await Store.GetStatusAsync(authorization, cancellationToken); var status = await Store.GetStatusAsync(authorization, cancellationToken);

4
src/OpenIddict.Core/Managers/OpenIddictScopeManager.cs

@ -450,7 +450,7 @@ public class OpenIddictScopeManager<TScope> : IOpenIddictScopeManager where TSco
TScope scope!!, CultureInfo culture!!, CancellationToken cancellationToken = default) TScope scope!!, CultureInfo culture!!, CancellationToken cancellationToken = default)
{ {
var names = await Store.GetDisplayNamesAsync(scope, cancellationToken); var names = await Store.GetDisplayNamesAsync(scope, cancellationToken);
if (names is not { IsEmpty: false }) if (names is not { Count: > 0 })
{ {
return await Store.GetDisplayNameAsync(scope, cancellationToken); return await Store.GetDisplayNameAsync(scope, cancellationToken);
} }
@ -500,7 +500,7 @@ public class OpenIddictScopeManager<TScope> : IOpenIddictScopeManager where TSco
TScope scope!!, CultureInfo culture!!, CancellationToken cancellationToken = default) TScope scope!!, CultureInfo culture!!, CancellationToken cancellationToken = default)
{ {
var descriptions = await Store.GetDescriptionsAsync(scope, cancellationToken); var descriptions = await Store.GetDescriptionsAsync(scope, cancellationToken);
if (descriptions is not { IsEmpty: false }) if (descriptions is not { Count: > 0 })
{ {
return await Store.GetDescriptionAsync(scope, cancellationToken); return await Store.GetDescriptionAsync(scope, cancellationToken);
} }

12
src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs

@ -729,7 +729,7 @@ public class OpenIddictTokenManager<TToken> : IOpenIddictTokenManager where TTok
/// <param name="token">The token.</param> /// <param name="token">The token.</param>
/// <param name="status">The expected status.</param> /// <param name="status">The expected status.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the token has the specified status, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the token has the specified status, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> HasStatusAsync(TToken token!!, string status, CancellationToken cancellationToken = default) public virtual async ValueTask<bool> HasStatusAsync(TToken token!!, string status, CancellationToken cancellationToken = default)
{ {
if (string.IsNullOrEmpty(status)) if (string.IsNullOrEmpty(status))
@ -746,7 +746,7 @@ public class OpenIddictTokenManager<TToken> : IOpenIddictTokenManager where TTok
/// <param name="token">The token.</param> /// <param name="token">The token.</param>
/// <param name="type">The expected type.</param> /// <param name="type">The expected type.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the token has the specified type, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the token has the specified type, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> HasTypeAsync(TToken token!!, string type, CancellationToken cancellationToken = default) public virtual async ValueTask<bool> HasTypeAsync(TToken token!!, string type, CancellationToken cancellationToken = default)
{ {
if (string.IsNullOrEmpty(type)) if (string.IsNullOrEmpty(type))
@ -763,7 +763,7 @@ public class OpenIddictTokenManager<TToken> : IOpenIddictTokenManager where TTok
/// <param name="token">The token.</param> /// <param name="token">The token.</param>
/// <param name="types">The expected types.</param> /// <param name="types">The expected types.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the token has any of the specified types, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the token has any of the specified types, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> HasTypeAsync(TToken token!!, ImmutableArray<string> types, CancellationToken cancellationToken = default) public virtual async ValueTask<bool> HasTypeAsync(TToken token!!, ImmutableArray<string> types, CancellationToken cancellationToken = default)
{ {
var type = await Store.GetTypeAsync(token, cancellationToken); var type = await Store.GetTypeAsync(token, cancellationToken);
@ -892,7 +892,7 @@ public class OpenIddictTokenManager<TToken> : IOpenIddictTokenManager where TTok
/// </summary> /// </summary>
/// <param name="token">The token to redeem.</param> /// <param name="token">The token to redeem.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the token was successfully redemeed, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the token was successfully redemeed, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> TryRedeemAsync(TToken token!!, CancellationToken cancellationToken = default) public virtual async ValueTask<bool> TryRedeemAsync(TToken token!!, CancellationToken cancellationToken = default)
{ {
// If the token doesn't have a redemption date attached, this likely means it's // If the token doesn't have a redemption date attached, this likely means it's
@ -933,7 +933,7 @@ public class OpenIddictTokenManager<TToken> : IOpenIddictTokenManager where TTok
/// </summary> /// </summary>
/// <param name="token">The token to reject.</param> /// <param name="token">The token to reject.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the token was successfully redemeed, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the token was successfully redemeed, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> TryRejectAsync(TToken token!!, CancellationToken cancellationToken = default) public virtual async ValueTask<bool> TryRejectAsync(TToken token!!, CancellationToken cancellationToken = default)
{ {
await Store.SetStatusAsync(token, Statuses.Rejected, cancellationToken); await Store.SetStatusAsync(token, Statuses.Rejected, cancellationToken);
@ -967,7 +967,7 @@ public class OpenIddictTokenManager<TToken> : IOpenIddictTokenManager where TTok
/// </summary> /// </summary>
/// <param name="token">The token to revoke.</param> /// <param name="token">The token to revoke.</param>
/// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param> /// <param name="cancellationToken">The <see cref="CancellationToken"/> that can be used to abort the operation.</param>
/// <returns><c>true</c> if the token was successfully revoked, <c>false</c> otherwise.</returns> /// <returns><see langword="true"/> if the token was successfully revoked, <see langword="false"/> otherwise.</returns>
public virtual async ValueTask<bool> TryRevokeAsync(TToken token!!, CancellationToken cancellationToken = default) public virtual async ValueTask<bool> TryRevokeAsync(TToken token!!, CancellationToken cancellationToken = default)
{ {
await Store.SetStatusAsync(token, Statuses.Revoked, cancellationToken); await Store.SetStatusAsync(token, Statuses.Revoked, cancellationToken);

4
src/OpenIddict.Core/OpenIddictCoreOptions.cs

@ -39,7 +39,7 @@ public class OpenIddictCoreOptions
/// Gets or sets a boolean indicating whether additional filtering should be disabled, /// Gets or sets a boolean indicating whether additional filtering should be disabled,
/// so that the OpenIddict managers don't execute a second check to ensure the results /// so that the OpenIddict managers don't execute a second check to ensure the results
/// returned by the stores exactly match the specified query filters, casing included. /// returned by the stores exactly match the specified query filters, casing included.
/// This property SHOULD NOT be set to <c>true</c> except when the underlying stores /// This property SHOULD NOT be set to <see langword="true"/> except when the underlying stores
/// are guaranteed to execute case-sensitive filtering at the database level. /// are guaranteed to execute case-sensitive filtering at the database level.
/// Disabling this feature MAY result in security vulnerabilities in the other cases. /// Disabling this feature MAY result in security vulnerabilities in the other cases.
/// </summary> /// </summary>
@ -56,7 +56,7 @@ public class OpenIddictCoreOptions
/// Gets or sets the maximum number of cached entries allowed. When the threshold /// Gets or sets the maximum number of cached entries allowed. When the threshold
/// is reached, the cache is automatically compacted to ensure it doesn't grow /// is reached, the cache is automatically compacted to ensure it doesn't grow
/// abnormally and doesn't cause a memory starvation or out-of-memory exceptions. /// abnormally and doesn't cause a memory starvation or out-of-memory exceptions.
/// This property is not used when <see cref="DisableEntityCaching"/> is <c>true</c>. /// This property is not used when <see cref="DisableEntityCaching"/> is <see langword="true"/>.
/// </summary> /// </summary>
public int EntityCacheLimit { get; set; } = 250; public int EntityCacheLimit { get; set; } = 250;
} }

2
src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkApplication.cs

@ -87,7 +87,7 @@ public class OpenIddictEntityFrameworkApplication<TKey, TAuthorization, TToken>
/// <summary> /// <summary>
/// Gets or sets the additional properties serialized as a JSON object, /// Gets or sets the additional properties serialized as a JSON object,
/// or <c>null</c> if no bag was associated with the current application. /// or <see langword="null"/> if no bag was associated with the current application.
/// </summary> /// </summary>
public virtual string? Properties { get; set; } public virtual string? Properties { get; set; }

2
src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkAuthorization.cs

@ -51,7 +51,7 @@ public class OpenIddictEntityFrameworkAuthorization<TKey, TApplication, TToken>
/// <summary> /// <summary>
/// Gets or sets the additional properties serialized as a JSON object, /// Gets or sets the additional properties serialized as a JSON object,
/// or <c>null</c> if no bag was associated with the current authorization. /// or <see langword="null"/> if no bag was associated with the current authorization.
/// </summary> /// </summary>
public virtual string? Properties { get; set; } public virtual string? Properties { get; set; }

2
src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkScope.cs

@ -66,7 +66,7 @@ public class OpenIddictEntityFrameworkScope<TKey> where TKey : notnull, IEquatab
/// <summary> /// <summary>
/// Gets or sets the additional properties serialized as a JSON object, /// Gets or sets the additional properties serialized as a JSON object,
/// or <c>null</c> if no bag was associated with the current scope. /// or <see langword="null"/> if no bag was associated with the current scope.
/// </summary> /// </summary>
public virtual string? Properties { get; set; } public virtual string? Properties { get; set; }

2
src/OpenIddict.EntityFramework.Models/OpenIddictEntityFrameworkToken.cs

@ -68,7 +68,7 @@ public class OpenIddictEntityFrameworkToken<TKey, TApplication, TAuthorization>
/// <summary> /// <summary>
/// Gets or sets the additional properties serialized as a JSON object, /// Gets or sets the additional properties serialized as a JSON object,
/// or <c>null</c> if no bag was associated with the current token. /// or <see langword="null"/> if no bag was associated with the current token.
/// </summary> /// </summary>
public virtual string? Properties { get; set; } public virtual string? Properties { get; set; }

4
src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkAuthorizationStore.cs

@ -350,7 +350,7 @@ public class OpenIddictEntityFrameworkAuthorizationStore<TAuthorization, TApplic
if (authorization.Application is null) if (authorization.Application is null)
{ {
var reference = Context.Entry(authorization).Reference(entry => entry.Application); var reference = Context.Entry(authorization).Reference(entry => entry.Application);
if (reference.EntityEntry.State == EntityState.Detached) if (reference.EntityEntry.State is EntityState.Detached)
{ {
return null; return null;
} }
@ -598,7 +598,7 @@ public class OpenIddictEntityFrameworkAuthorizationStore<TAuthorization, TApplic
if (authorization.Application is null) if (authorization.Application is null)
{ {
var reference = Context.Entry(authorization).Reference(entry => entry.Application); var reference = Context.Entry(authorization).Reference(entry => entry.Application);
if (reference.EntityEntry.State == EntityState.Detached) if (reference.EntityEntry.State is EntityState.Detached)
{ {
return; return;
} }

10
src/OpenIddict.EntityFramework/Stores/OpenIddictEntityFrameworkTokenStore.cs

@ -290,7 +290,7 @@ public class OpenIddictEntityFrameworkTokenStore<TToken, TApplication, TAuthoriz
if (token.Application is null) if (token.Application is null)
{ {
var reference = Context.Entry(token).Reference(entry => entry.Application); var reference = Context.Entry(token).Reference(entry => entry.Application);
if (reference.EntityEntry.State == EntityState.Detached) if (reference.EntityEntry.State is EntityState.Detached)
{ {
return null; return null;
} }
@ -321,7 +321,7 @@ public class OpenIddictEntityFrameworkTokenStore<TToken, TApplication, TAuthoriz
if (token.Authorization is null) if (token.Authorization is null)
{ {
var reference = Context.Entry(token).Reference(entry => entry.Authorization); var reference = Context.Entry(token).Reference(entry => entry.Authorization);
if (reference.EntityEntry.State == EntityState.Detached) if (reference.EntityEntry.State is EntityState.Detached)
{ {
return null; return null;
} }
@ -541,7 +541,7 @@ public class OpenIddictEntityFrameworkTokenStore<TToken, TApplication, TAuthoriz
if (token.Application is null) if (token.Application is null)
{ {
var reference = Context.Entry(token).Reference(entry => entry.Application); var reference = Context.Entry(token).Reference(entry => entry.Application);
if (reference.EntityEntry.State == EntityState.Detached) if (reference.EntityEntry.State is EntityState.Detached)
{ {
return; return;
} }
@ -569,7 +569,7 @@ public class OpenIddictEntityFrameworkTokenStore<TToken, TApplication, TAuthoriz
if (token.Authorization is null) if (token.Authorization is null)
{ {
var reference = Context.Entry(token).Reference(entry => entry.Authorization); var reference = Context.Entry(token).Reference(entry => entry.Authorization);
if (reference.EntityEntry.State == EntityState.Detached) if (reference.EntityEntry.State is EntityState.Detached)
{ {
return; return;
} }
@ -609,7 +609,7 @@ public class OpenIddictEntityFrameworkTokenStore<TToken, TApplication, TAuthoriz
public virtual ValueTask SetPropertiesAsync(TToken token!!, public virtual ValueTask SetPropertiesAsync(TToken token!!,
ImmutableDictionary<string, JsonElement> properties, CancellationToken cancellationToken) ImmutableDictionary<string, JsonElement> properties, CancellationToken cancellationToken)
{ {
if (properties is not { IsEmpty: false }) if (properties is not { Count: > 0 })
{ {
token.Properties = null; token.Properties = null;

2
src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreApplication.cs

@ -95,7 +95,7 @@ public class OpenIddictEntityFrameworkCoreApplication<TKey, TAuthorization, TTok
/// <summary> /// <summary>
/// Gets or sets the additional properties serialized as a JSON object, /// Gets or sets the additional properties serialized as a JSON object,
/// or <c>null</c> if no bag was associated with the current application. /// or <see langword="null"/> if no bag was associated with the current application.
/// </summary> /// </summary>
public virtual string? Properties { get; set; } public virtual string? Properties { get; set; }

2
src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreAuthorization.cs

@ -59,7 +59,7 @@ public class OpenIddictEntityFrameworkCoreAuthorization<TKey, TApplication, TTok
/// <summary> /// <summary>
/// Gets or sets the additional properties serialized as a JSON object, /// Gets or sets the additional properties serialized as a JSON object,
/// or <c>null</c> if no bag was associated with the current authorization. /// or <see langword="null"/> if no bag was associated with the current authorization.
/// </summary> /// </summary>
public virtual string? Properties { get; set; } public virtual string? Properties { get; set; }

2
src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreScope.cs

@ -66,7 +66,7 @@ public class OpenIddictEntityFrameworkCoreScope<TKey> where TKey : notnull, IEqu
/// <summary> /// <summary>
/// Gets or sets the additional properties serialized as a JSON object, /// Gets or sets the additional properties serialized as a JSON object,
/// or <c>null</c> if no bag was associated with the current scope. /// or <see langword="null"/> if no bag was associated with the current scope.
/// </summary> /// </summary>
public virtual string? Properties { get; set; } public virtual string? Properties { get; set; }

2
src/OpenIddict.EntityFrameworkCore.Models/OpenIddictEntityFrameworkCoreToken.cs

@ -76,7 +76,7 @@ public class OpenIddictEntityFrameworkCoreToken<TKey, TApplication, TAuthorizati
/// <summary> /// <summary>
/// Gets or sets the additional properties serialized as a JSON object, /// Gets or sets the additional properties serialized as a JSON object,
/// or <c>null</c> if no bag was associated with the current token. /// or <see langword="null"/> if no bag was associated with the current token.
/// </summary> /// </summary>
public virtual string? Properties { get; set; } public virtual string? Properties { get; set; }

4
src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreAuthorizationStore.cs

@ -415,7 +415,7 @@ public class OpenIddictEntityFrameworkCoreAuthorizationStore<TAuthorization, TAp
if (authorization.Application is null) if (authorization.Application is null)
{ {
var reference = Context.Entry(authorization).Reference(entry => entry.Application); var reference = Context.Entry(authorization).Reference(entry => entry.Application);
if (reference.EntityEntry.State == EntityState.Detached) if (reference.EntityEntry.State is EntityState.Detached)
{ {
return null; return null;
} }
@ -683,7 +683,7 @@ public class OpenIddictEntityFrameworkCoreAuthorizationStore<TAuthorization, TAp
if (authorization.Application is null) if (authorization.Application is null)
{ {
var reference = Context.Entry(authorization).Reference(entry => entry.Application); var reference = Context.Entry(authorization).Reference(entry => entry.Application);
if (reference.EntityEntry.State == EntityState.Detached) if (reference.EntityEntry.State is EntityState.Detached)
{ {
return; return;
} }

10
src/OpenIddict.EntityFrameworkCore/Stores/OpenIddictEntityFrameworkCoreTokenStore.cs

@ -339,7 +339,7 @@ public class OpenIddictEntityFrameworkCoreTokenStore<TToken, TApplication, TAuth
if (token.Application is null) if (token.Application is null)
{ {
var reference = Context.Entry(token).Reference(entry => entry.Application); var reference = Context.Entry(token).Reference(entry => entry.Application);
if (reference.EntityEntry.State == EntityState.Detached) if (reference.EntityEntry.State is EntityState.Detached)
{ {
return null; return null;
} }
@ -370,7 +370,7 @@ public class OpenIddictEntityFrameworkCoreTokenStore<TToken, TApplication, TAuth
if (token.Authorization is null) if (token.Authorization is null)
{ {
var reference = Context.Entry(token).Reference(entry => entry.Authorization); var reference = Context.Entry(token).Reference(entry => entry.Authorization);
if (reference.EntityEntry.State == EntityState.Detached) if (reference.EntityEntry.State is EntityState.Detached)
{ {
return null; return null;
} }
@ -606,7 +606,7 @@ public class OpenIddictEntityFrameworkCoreTokenStore<TToken, TApplication, TAuth
if (token.Application is null) if (token.Application is null)
{ {
var reference = Context.Entry(token).Reference(entry => entry.Application); var reference = Context.Entry(token).Reference(entry => entry.Application);
if (reference.EntityEntry.State == EntityState.Detached) if (reference.EntityEntry.State is EntityState.Detached)
{ {
return; return;
} }
@ -639,7 +639,7 @@ public class OpenIddictEntityFrameworkCoreTokenStore<TToken, TApplication, TAuth
if (token.Authorization is null) if (token.Authorization is null)
{ {
var reference = Context.Entry(token).Reference(entry => entry.Authorization); var reference = Context.Entry(token).Reference(entry => entry.Authorization);
if (reference.EntityEntry.State == EntityState.Detached) if (reference.EntityEntry.State is EntityState.Detached)
{ {
return; return;
} }
@ -679,7 +679,7 @@ public class OpenIddictEntityFrameworkCoreTokenStore<TToken, TApplication, TAuth
public virtual ValueTask SetPropertiesAsync(TToken token!!, public virtual ValueTask SetPropertiesAsync(TToken token!!,
ImmutableDictionary<string, JsonElement> properties, CancellationToken cancellationToken) ImmutableDictionary<string, JsonElement> properties, CancellationToken cancellationToken)
{ {
if (properties is not { IsEmpty: false }) if (properties is not { Count: > 0 })
{ {
token.Properties = null; token.Properties = null;

2
src/OpenIddict.MongoDb/Stores/OpenIddictMongoDbTokenStore.cs

@ -545,7 +545,7 @@ public class OpenIddictMongoDbTokenStore<TToken> : IOpenIddictTokenStore<TToken>
public virtual ValueTask SetPropertiesAsync(TToken token!!, public virtual ValueTask SetPropertiesAsync(TToken token!!,
ImmutableDictionary<string, JsonElement> properties, CancellationToken cancellationToken) ImmutableDictionary<string, JsonElement> properties, CancellationToken cancellationToken)
{ {
if (properties is not { IsEmpty: false }) if (properties is not { Count: > 0 })
{ {
token.Properties = null; token.Properties = null;

6
src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreHelpers.cs

@ -18,7 +18,7 @@ public static class OpenIddictServerAspNetCoreHelpers
/// Retrieves the <see cref="HttpRequest"/> instance stored in the <see cref="OpenIddictServerTransaction"/> properties. /// Retrieves the <see cref="HttpRequest"/> instance stored in the <see cref="OpenIddictServerTransaction"/> properties.
/// </summary> /// </summary>
/// <param name="transaction">The transaction instance.</param> /// <param name="transaction">The transaction instance.</param>
/// <returns>The <see cref="HttpRequest"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="HttpRequest"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static HttpRequest? GetHttpRequest(this OpenIddictServerTransaction transaction!!) public static HttpRequest? GetHttpRequest(this OpenIddictServerTransaction transaction!!)
{ {
if (!transaction.Properties.TryGetValue(typeof(HttpRequest).FullName!, out object? property)) if (!transaction.Properties.TryGetValue(typeof(HttpRequest).FullName!, out object? property))
@ -48,7 +48,7 @@ public static class OpenIddictServerAspNetCoreHelpers
/// Retrieves the <see cref="OpenIddictRequest"/> instance stored in <see cref="BaseContext"/>. /// Retrieves the <see cref="OpenIddictRequest"/> instance stored in <see cref="BaseContext"/>.
/// </summary> /// </summary>
/// <param name="context">The context instance.</param> /// <param name="context">The context instance.</param>
/// <returns>The <see cref="OpenIddictRequest"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="OpenIddictRequest"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static OpenIddictRequest? GetOpenIddictServerRequest(this HttpContext context!!) public static OpenIddictRequest? GetOpenIddictServerRequest(this HttpContext context!!)
{ {
return context.Features.Get<OpenIddictServerAspNetCoreFeature>()?.Transaction?.Request; return context.Features.Get<OpenIddictServerAspNetCoreFeature>()?.Transaction?.Request;
@ -58,7 +58,7 @@ public static class OpenIddictServerAspNetCoreHelpers
/// Retrieves the <see cref="OpenIddictResponse"/> instance stored in <see cref="BaseContext"/>. /// Retrieves the <see cref="OpenIddictResponse"/> instance stored in <see cref="BaseContext"/>.
/// </summary> /// </summary>
/// <param name="context">The context instance.</param> /// <param name="context">The context instance.</param>
/// <returns>The <see cref="OpenIddictResponse"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="OpenIddictResponse"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static OpenIddictResponse? GetOpenIddictServerResponse(this HttpContext context!!) public static OpenIddictResponse? GetOpenIddictServerResponse(this HttpContext context!!)
{ {
return context.Features.Get<OpenIddictServerAspNetCoreFeature>()?.Transaction?.Response; return context.Features.Get<OpenIddictServerAspNetCoreFeature>()?.Transaction?.Response;

2
src/OpenIddict.Server.AspNetCore/OpenIddictServerAspNetCoreOptions.cs

@ -16,7 +16,7 @@ public class OpenIddictServerAspNetCoreOptions : AuthenticationSchemeOptions
{ {
/// <summary> /// <summary>
/// Gets or sets a boolean indicating whether incoming requests arriving on insecure endpoints should be rejected. /// Gets or sets a boolean indicating whether incoming requests arriving on insecure endpoints should be rejected.
/// By default, this property is set to <c>false</c> to help mitigate man-in-the-middle attacks. /// By default, this property is set to <see langword="false"/> to help mitigate man-in-the-middle attacks.
/// </summary> /// </summary>
public bool DisableTransportSecurityRequirement { get; set; } public bool DisableTransportSecurityRequirement { get; set; }

12
src/OpenIddict.Server.DataProtection/OpenIddictServerDataProtectionOptions.cs

@ -17,7 +17,7 @@ public class OpenIddictServerDataProtectionOptions
/// <summary> /// <summary>
/// Gets or sets the data protection provider used to create the default /// Gets or sets the data protection provider used to create the default
/// data protectors used by the OpenIddict Data Protection server services. /// data protectors used by the OpenIddict Data Protection server services.
/// When this property is set to <c>null</c>, the data protection provider /// When this property is set to <see langword="null"/>, the data protection provider
/// is directly retrieved from the dependency injection container. /// is directly retrieved from the dependency injection container.
/// </summary> /// </summary>
public IDataProtectionProvider DataProtectionProvider { get; set; } = default!; public IDataProtectionProvider DataProtectionProvider { get; set; } = default!;
@ -30,31 +30,31 @@ public class OpenIddictServerDataProtectionOptions
/// <summary> /// <summary>
/// Gets or sets a boolean indicating whether the default access token format should be /// Gets or sets a boolean indicating whether the default access token format should be
/// used when issuing new access tokens. This property is set to <c>false</c> by default. /// used when issuing new access tokens. This property is set to <see langword="false"/> by default.
/// </summary> /// </summary>
public bool PreferDefaultAccessTokenFormat { get; set; } public bool PreferDefaultAccessTokenFormat { get; set; }
/// <summary> /// <summary>
/// Gets or sets a boolean indicating whether the default authorization code format should be /// Gets or sets a boolean indicating whether the default authorization code format should be
/// used when issuing new authorization codes. This property is set to <c>false</c> by default. /// used when issuing new authorization codes. This property is set to <see langword="false"/> by default.
/// </summary> /// </summary>
public bool PreferDefaultAuthorizationCodeFormat { get; set; } public bool PreferDefaultAuthorizationCodeFormat { get; set; }
/// <summary> /// <summary>
/// Gets or sets a boolean indicating whether the default device code format should be /// Gets or sets a boolean indicating whether the default device code format should be
/// used when issuing new device codes. This property is set to <c>false</c> by default. /// used when issuing new device codes. This property is set to <see langword="false"/> by default.
/// </summary> /// </summary>
public bool PreferDefaultDeviceCodeFormat { get; set; } public bool PreferDefaultDeviceCodeFormat { get; set; }
/// <summary> /// <summary>
/// Gets or sets a boolean indicating whether the default refresh token format should be /// Gets or sets a boolean indicating whether the default refresh token format should be
/// used when issuing new refresh tokens. This property is set to <c>false</c> by default. /// used when issuing new refresh tokens. This property is set to <see langword="false"/> by default.
/// </summary> /// </summary>
public bool PreferDefaultRefreshTokenFormat { get; set; } public bool PreferDefaultRefreshTokenFormat { get; set; }
/// <summary> /// <summary>
/// Gets or sets a boolean indicating whether the default user code format should be /// Gets or sets a boolean indicating whether the default user code format should be
/// used when issuing new user codes. This property is set to <c>false</c> by default. /// used when issuing new user codes. This property is set to <see langword="false"/> by default.
/// </summary> /// </summary>
public bool PreferDefaultUserCodeFormat { get; set; } public bool PreferDefaultUserCodeFormat { get; set; }
} }

6
src/OpenIddict.Server.Owin/OpenIddictServerOwinHelpers.cs

@ -28,7 +28,7 @@ public static class OpenIddictServerOwinHelpers
/// Retrieves the <see cref="IOwinRequest"/> instance stored in the <see cref="OpenIddictServerTransaction"/> properties. /// Retrieves the <see cref="IOwinRequest"/> instance stored in the <see cref="OpenIddictServerTransaction"/> properties.
/// </summary> /// </summary>
/// <param name="transaction">The transaction instance.</param> /// <param name="transaction">The transaction instance.</param>
/// <returns>The <see cref="IOwinRequest"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="IOwinRequest"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static IOwinRequest? GetOwinRequest(this OpenIddictServerTransaction transaction!!) public static IOwinRequest? GetOwinRequest(this OpenIddictServerTransaction transaction!!)
{ {
if (!transaction.Properties.TryGetValue(typeof(IOwinRequest).FullName!, out object? property)) if (!transaction.Properties.TryGetValue(typeof(IOwinRequest).FullName!, out object? property))
@ -56,7 +56,7 @@ public static class OpenIddictServerOwinHelpers
/// Retrieves the <see cref="OpenIddictRequest"/> instance stored in <see cref="BaseContext"/>. /// Retrieves the <see cref="OpenIddictRequest"/> instance stored in <see cref="BaseContext"/>.
/// </summary> /// </summary>
/// <param name="context">The context instance.</param> /// <param name="context">The context instance.</param>
/// <returns>The <see cref="OpenIddictRequest"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="OpenIddictRequest"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static OpenIddictRequest? GetOpenIddictServerRequest(this IOwinContext context!!) public static OpenIddictRequest? GetOpenIddictServerRequest(this IOwinContext context!!)
=> context.Get<OpenIddictServerTransaction>(typeof(OpenIddictServerTransaction).FullName)?.Request; => context.Get<OpenIddictServerTransaction>(typeof(OpenIddictServerTransaction).FullName)?.Request;
@ -64,7 +64,7 @@ public static class OpenIddictServerOwinHelpers
/// Retrieves the <see cref="OpenIddictResponse"/> instance stored in <see cref="BaseContext"/>. /// Retrieves the <see cref="OpenIddictResponse"/> instance stored in <see cref="BaseContext"/>.
/// </summary> /// </summary>
/// <param name="context">The context instance.</param> /// <param name="context">The context instance.</param>
/// <returns>The <see cref="OpenIddictResponse"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="OpenIddictResponse"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static OpenIddictResponse? GetOpenIddictServerResponse(this IOwinContext context!!) public static OpenIddictResponse? GetOpenIddictServerResponse(this IOwinContext context!!)
=> context.Get<OpenIddictServerTransaction>(typeof(OpenIddictServerTransaction).FullName)?.Response; => context.Get<OpenIddictServerTransaction>(typeof(OpenIddictServerTransaction).FullName)?.Response;
} }

2
src/OpenIddict.Server.Owin/OpenIddictServerOwinOptions.cs

@ -23,7 +23,7 @@ public class OpenIddictServerOwinOptions : AuthenticationOptions
/// <summary> /// <summary>
/// Gets or sets a boolean indicating whether incoming requests arriving on insecure endpoints should be rejected. /// Gets or sets a boolean indicating whether incoming requests arriving on insecure endpoints should be rejected.
/// By default, this property is set to <c>false</c> to help mitigate man-in-the-middle attacks. /// By default, this property is set to <see langword="false"/> to help mitigate man-in-the-middle attacks.
/// </summary> /// </summary>
public bool DisableTransportSecurityRequirement { get; set; } public bool DisableTransportSecurityRequirement { get; set; }

16
src/OpenIddict.Server/OpenIddictServerBuilder.cs

@ -131,7 +131,7 @@ public class OpenIddictServerBuilder
{ {
// If the encryption key is an asymmetric security key, ensure it has a private key. // If the encryption key is an asymmetric security key, ensure it has a private key.
if (key is AsymmetricSecurityKey asymmetricSecurityKey && if (key is AsymmetricSecurityKey asymmetricSecurityKey &&
asymmetricSecurityKey.PrivateKeyStatus == PrivateKeyStatus.DoesNotExist) asymmetricSecurityKey.PrivateKeyStatus is PrivateKeyStatus.DoesNotExist)
{ {
throw new InvalidOperationException(SR.GetResourceString(SR.ID0055)); throw new InvalidOperationException(SR.GetResourceString(SR.ID0055));
} }
@ -491,7 +491,7 @@ public class OpenIddictServerBuilder
{ {
// If the signing key is an asymmetric security key, ensure it has a private key. // If the signing key is an asymmetric security key, ensure it has a private key.
if (key is AsymmetricSecurityKey asymmetricSecurityKey && if (key is AsymmetricSecurityKey asymmetricSecurityKey &&
asymmetricSecurityKey.PrivateKeyStatus == PrivateKeyStatus.DoesNotExist) asymmetricSecurityKey.PrivateKeyStatus is PrivateKeyStatus.DoesNotExist)
{ {
throw new InvalidOperationException(SR.GetResourceString(SR.ID0067)); throw new InvalidOperationException(SR.GetResourceString(SR.ID0067));
} }
@ -1505,7 +1505,7 @@ public class OpenIddictServerBuilder
/// a new access token by making a grant_type=refresh_token token request /// a new access token by making a grant_type=refresh_token token request
/// or a prompt=none authorization request, depending on the selected flow. /// or a prompt=none authorization request, depending on the selected flow.
/// Using long-lived access tokens or tokens that never expire is not recommended. /// Using long-lived access tokens or tokens that never expire is not recommended.
/// While discouraged, <c>null</c> can be specified to issue tokens that never expire. /// While discouraged, <see langword="null"/> can be specified to issue tokens that never expire.
/// </summary> /// </summary>
/// <param name="lifetime">The access token lifetime.</param> /// <param name="lifetime">The access token lifetime.</param>
/// <returns>The <see cref="OpenIddictServerBuilder"/>.</returns> /// <returns>The <see cref="OpenIddictServerBuilder"/>.</returns>
@ -1516,7 +1516,7 @@ public class OpenIddictServerBuilder
/// Sets the authorization code lifetime, after which client applications /// Sets the authorization code lifetime, after which client applications
/// are unable to send a grant_type=authorization_code token request. /// are unable to send a grant_type=authorization_code token request.
/// Using short-lived authorization codes is strongly recommended. /// Using short-lived authorization codes is strongly recommended.
/// While discouraged, <c>null</c> can be specified to issue codes that never expire. /// While discouraged, <see langword="null"/> can be specified to issue codes that never expire.
/// </summary> /// </summary>
/// <param name="lifetime">The authorization code lifetime.</param> /// <param name="lifetime">The authorization code lifetime.</param>
/// <returns>The <see cref="OpenIddictServerBuilder"/>.</returns> /// <returns>The <see cref="OpenIddictServerBuilder"/>.</returns>
@ -1527,7 +1527,7 @@ public class OpenIddictServerBuilder
/// Sets the device code lifetime, after which client applications are unable to /// Sets the device code lifetime, after which client applications are unable to
/// send a grant_type=urn:ietf:params:oauth:grant-type:device_code token request. /// send a grant_type=urn:ietf:params:oauth:grant-type:device_code token request.
/// Using short-lived device codes is strongly recommended. /// Using short-lived device codes is strongly recommended.
/// While discouraged, <c>null</c> can be specified to issue codes that never expire. /// While discouraged, <see langword="null"/> can be specified to issue codes that never expire.
/// </summary> /// </summary>
/// <param name="lifetime">The authorization code lifetime.</param> /// <param name="lifetime">The authorization code lifetime.</param>
/// <returns>The <see cref="OpenIddictServerBuilder"/>.</returns> /// <returns>The <see cref="OpenIddictServerBuilder"/>.</returns>
@ -1537,7 +1537,7 @@ public class OpenIddictServerBuilder
/// <summary> /// <summary>
/// Sets the identity token lifetime, after which client /// Sets the identity token lifetime, after which client
/// applications should refuse processing identity tokens. /// applications should refuse processing identity tokens.
/// While discouraged, <c>null</c> can be specified to issue tokens that never expire. /// While discouraged, <see langword="null"/> can be specified to issue tokens that never expire.
/// </summary> /// </summary>
/// <param name="lifetime">The identity token lifetime.</param> /// <param name="lifetime">The identity token lifetime.</param>
/// <returns>The <see cref="OpenIddictServerBuilder"/>.</returns> /// <returns>The <see cref="OpenIddictServerBuilder"/>.</returns>
@ -1549,7 +1549,7 @@ public class OpenIddictServerBuilder
/// a new authorization from the user. When sliding expiration is enabled, /// a new authorization from the user. When sliding expiration is enabled,
/// a new refresh token is always issued to the client application, /// a new refresh token is always issued to the client application,
/// which prolongs the validity period of the refresh token. /// which prolongs the validity period of the refresh token.
/// While discouraged, <c>null</c> can be specified to issue tokens that never expire. /// While discouraged, <see langword="null"/> can be specified to issue tokens that never expire.
/// </summary> /// </summary>
/// <param name="lifetime">The refresh token lifetime.</param> /// <param name="lifetime">The refresh token lifetime.</param>
/// <returns>The <see cref="OpenIddictServerBuilder"/>.</returns> /// <returns>The <see cref="OpenIddictServerBuilder"/>.</returns>
@ -1568,7 +1568,7 @@ public class OpenIddictServerBuilder
/// <summary> /// <summary>
/// Sets the user code lifetime, after which they'll no longer be considered valid. /// Sets the user code lifetime, after which they'll no longer be considered valid.
/// Using short-lived device codes is strongly recommended. /// Using short-lived device codes is strongly recommended.
/// While discouraged, <c>null</c> can be specified to issue codes that never expire. /// While discouraged, <see langword="null"/> can be specified to issue codes that never expire.
/// </summary> /// </summary>
/// <param name="lifetime">The authorization code lifetime.</param> /// <param name="lifetime">The authorization code lifetime.</param>
/// <returns>The <see cref="OpenIddictServerBuilder"/>.</returns> /// <returns>The <see cref="OpenIddictServerBuilder"/>.</returns>

6
src/OpenIddict.Server/OpenIddictServerEvents.Authentication.cs

@ -25,7 +25,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request or <c>null</c> if it was extracted yet. /// Gets or sets the request or <see langword="null"/> if it was extracted yet.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -153,7 +153,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -187,7 +187,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets the error code returned to the client application. /// Gets the error code returned to the client application.
/// When the response indicates a successful response, /// When the response indicates a successful response,
/// this property returns <c>null</c>. /// this property returns <see langword="null"/>.
/// </summary> /// </summary>
public string? Error => Response?.Error; public string? Error => Response?.Error;

12
src/OpenIddict.Server/OpenIddictServerEvents.Device.cs

@ -25,7 +25,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the request, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -119,7 +119,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -139,7 +139,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets the error code returned to the client application. /// Gets the error code returned to the client application.
/// When the response indicates a successful response, /// When the response indicates a successful response,
/// this property returns <c>null</c>. /// this property returns <see langword="null"/>.
/// </summary> /// </summary>
public string? Error => Response.Error; public string? Error => Response.Error;
} }
@ -159,7 +159,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the request, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -263,7 +263,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -283,7 +283,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets the error code returned to the client application. /// Gets the error code returned to the client application.
/// When the response indicates a successful response, /// When the response indicates a successful response,
/// this property returns <c>null</c>. /// this property returns <see langword="null"/>.
/// </summary> /// </summary>
public string? Error => Response.Error; public string? Error => Response.Error;
} }

12
src/OpenIddict.Server/OpenIddictServerEvents.Discovery.cs

@ -25,7 +25,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the request, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -206,7 +206,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -226,7 +226,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets the error code returned to the client application. /// Gets the error code returned to the client application.
/// When the response indicates a successful response, /// When the response indicates a successful response,
/// this property returns <c>null</c>. /// this property returns <see langword="null"/>.
/// </summary> /// </summary>
public string? Error => Response.Error; public string? Error => Response.Error;
} }
@ -246,7 +246,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the request, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -331,7 +331,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -351,7 +351,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets the error code returned to the client application. /// Gets the error code returned to the client application.
/// When the response indicates a successful response, /// When the response indicates a successful response,
/// this property returns <c>null</c>. /// this property returns <see langword="null"/>.
/// </summary> /// </summary>
public string? Error => Response.Error; public string? Error => Response.Error;
} }

6
src/OpenIddict.Server/OpenIddictServerEvents.Exchange.cs

@ -25,7 +25,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the request, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -125,7 +125,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -145,7 +145,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets the error code returned to the client application. /// Gets the error code returned to the client application.
/// When the response indicates a successful response, /// When the response indicates a successful response,
/// this property returns <c>null</c>. /// this property returns <see langword="null"/>.
/// </summary> /// </summary>
public string? Error => Response.Error; public string? Error => Response.Error;
} }

8
src/OpenIddict.Server/OpenIddictServerEvents.Introspection.cs

@ -25,7 +25,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the request, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -59,7 +59,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets the optional token_type_hint parameter extracted from the /// Gets the optional token_type_hint parameter extracted from the
/// introspection request, or <c>null</c> if it cannot be found. /// introspection request, or <see langword="null"/> if it cannot be found.
/// </summary> /// </summary>
public string? TokenTypeHint => Request?.TokenTypeHint; public string? TokenTypeHint => Request?.TokenTypeHint;
@ -182,7 +182,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -202,7 +202,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets the error code returned to the client application. /// Gets the error code returned to the client application.
/// When the response indicates a successful response, /// When the response indicates a successful response,
/// this property returns <c>null</c>. /// this property returns <see langword="null"/>.
/// </summary> /// </summary>
public string? Error => Response.Error; public string? Error => Response.Error;
} }

4
src/OpenIddict.Server/OpenIddictServerEvents.Protection.cs

@ -26,7 +26,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it is not available. /// Gets or sets the request, or <see langword="null"/> if it is not available.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -97,7 +97,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it is not available. /// Gets or sets the request, or <see langword="null"/> if it is not available.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {

8
src/OpenIddict.Server/OpenIddictServerEvents.Revocation.cs

@ -25,7 +25,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the request, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -59,7 +59,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets the optional token_type_hint parameter extracted from the /// Gets the optional token_type_hint parameter extracted from the
/// revocation request, or <c>null</c> if it cannot be found. /// revocation request, or <see langword="null"/> if it cannot be found.
/// </summary> /// </summary>
public string? TokenTypeHint => Request.TokenTypeHint; public string? TokenTypeHint => Request.TokenTypeHint;
@ -112,7 +112,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -132,7 +132,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets the error code returned to the client application. /// Gets the error code returned to the client application.
/// When the response indicates a successful response, /// When the response indicates a successful response,
/// this property returns <c>null</c>. /// this property returns <see langword="null"/>.
/// </summary> /// </summary>
public string? Error => Response.Error; public string? Error => Response.Error;
} }

6
src/OpenIddict.Server/OpenIddictServerEvents.Session.cs

@ -23,7 +23,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if wasn't extracted yet. /// Gets or sets the request, or <see langword="null"/> if wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -147,7 +147,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -167,7 +167,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets the error code returned to the client application. /// Gets the error code returned to the client application.
/// When the response indicates a successful response, /// When the response indicates a successful response,
/// this property returns <c>null</c>. /// this property returns <see langword="null"/>.
/// </summary> /// </summary>
public string? Error => Response.Error; public string? Error => Response.Error;

6
src/OpenIddict.Server/OpenIddictServerEvents.Userinfo.cs

@ -26,7 +26,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the request, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -200,7 +200,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -220,7 +220,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets the error code returned to the client application. /// Gets the error code returned to the client application.
/// When the response indicates a successful response, /// When the response indicates a successful response,
/// this property returns <c>null</c>. /// this property returns <see langword="null"/>.
/// </summary> /// </summary>
public string? Error => Response.Error; public string? Error => Response.Error;
} }

16
src/OpenIddict.Server/OpenIddictServerEvents.cs

@ -196,7 +196,7 @@ public static partial class OpenIddictServerEvents
public ClaimsPrincipal? Principal { get; set; } public ClaimsPrincipal? Principal { get; set; }
/// <summary> /// <summary>
/// Gets the client identifier, or <c>null</c> if the client application is unknown. /// Gets the client identifier, or <see langword="null"/> if the client application is unknown.
/// </summary> /// </summary>
public string? ClientId => Transaction.Request?.ClientId; public string? ClientId => Transaction.Request?.ClientId;
} }
@ -229,7 +229,7 @@ public static partial class OpenIddictServerEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request or <c>null</c> if it couldn't be extracted. /// Gets or sets the request or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {
@ -705,7 +705,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets or sets the generated access token, if applicable. /// Gets or sets the generated access token, if applicable.
/// The access token will only be returned if /// The access token will only be returned if
/// <see cref="IncludeAccessToken"/> is set to <c>true</c>. /// <see cref="IncludeAccessToken"/> is set to <see langword="true"/>.
/// </summary> /// </summary>
public string? AccessToken { get; set; } public string? AccessToken { get; set; }
@ -718,7 +718,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets or sets the generated authorization code, if applicable. /// Gets or sets the generated authorization code, if applicable.
/// The authorization code will only be returned if /// The authorization code will only be returned if
/// <see cref="IncludeAuthorizationCode"/> is set to <c>true</c>. /// <see cref="IncludeAuthorizationCode"/> is set to <see langword="true"/>.
/// </summary> /// </summary>
public string? AuthorizationCode { get; set; } public string? AuthorizationCode { get; set; }
@ -731,7 +731,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets or sets the generated device code, if applicable. /// Gets or sets the generated device code, if applicable.
/// The device code will only be returned if /// The device code will only be returned if
/// <see cref="IncludeDeviceCode"/> is set to <c>true</c>. /// <see cref="IncludeDeviceCode"/> is set to <see langword="true"/>.
/// </summary> /// </summary>
public string? DeviceCode { get; set; } public string? DeviceCode { get; set; }
@ -744,7 +744,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets or sets the generated identity token, if applicable. /// Gets or sets the generated identity token, if applicable.
/// The identity token will only be returned if /// The identity token will only be returned if
/// <see cref="IncludeIdentityToken"/> is set to <c>true</c>. /// <see cref="IncludeIdentityToken"/> is set to <see langword="true"/>.
/// </summary> /// </summary>
public string? IdentityToken { get; set; } public string? IdentityToken { get; set; }
@ -757,7 +757,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets or sets the generated refresh token, if applicable. /// Gets or sets the generated refresh token, if applicable.
/// The refresh token will only be returned if /// The refresh token will only be returned if
/// <see cref="IncludeRefreshToken"/> is set to <c>true</c>. /// <see cref="IncludeRefreshToken"/> is set to <see langword="true"/>.
/// </summary> /// </summary>
public string? RefreshToken { get; set; } public string? RefreshToken { get; set; }
@ -770,7 +770,7 @@ public static partial class OpenIddictServerEvents
/// <summary> /// <summary>
/// Gets or sets the generated user code, if applicable. /// Gets or sets the generated user code, if applicable.
/// The user code will only be returned if /// The user code will only be returned if
/// <see cref="IncludeUserCode"/> is set to <c>true</c>. /// <see cref="IncludeUserCode"/> is set to <see langword="true"/>.
/// </summary> /// </summary>
public string? UserCode { get; set; } public string? UserCode { get; set; }

2
src/OpenIddict.Server/OpenIddictServerHelpers.cs

@ -17,7 +17,7 @@ public static class OpenIddictServerHelpers
/// <typeparam name="TProperty">The type of the property.</typeparam> /// <typeparam name="TProperty">The type of the property.</typeparam>
/// <param name="transaction">The server transaction.</param> /// <param name="transaction">The server transaction.</param>
/// <param name="name">The property name.</param> /// <param name="name">The property name.</param>
/// <returns>The property value or <c>null</c> if it couldn't be found.</returns> /// <returns>The property value or <see langword="null"/> if it couldn't be found.</returns>
public static TProperty? GetProperty<TProperty>( public static TProperty? GetProperty<TProperty>(
this OpenIddictServerTransaction transaction!!, string name) where TProperty : class this OpenIddictServerTransaction transaction!!, string name) where TProperty : class
{ {

6
src/OpenIddict.Validation.AspNetCore/OpenIddictValidationAspNetCoreHelpers.cs

@ -18,7 +18,7 @@ public static class OpenIddictValidationAspNetCoreHelpers
/// Retrieves the <see cref="HttpRequest"/> instance stored in the <see cref="OpenIddictValidationTransaction"/> properties. /// Retrieves the <see cref="HttpRequest"/> instance stored in the <see cref="OpenIddictValidationTransaction"/> properties.
/// </summary> /// </summary>
/// <param name="transaction">The transaction instance.</param> /// <param name="transaction">The transaction instance.</param>
/// <returns>The <see cref="HttpRequest"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="HttpRequest"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static HttpRequest? GetHttpRequest(this OpenIddictValidationTransaction transaction!!) public static HttpRequest? GetHttpRequest(this OpenIddictValidationTransaction transaction!!)
{ {
if (!transaction.Properties.TryGetValue(typeof(HttpRequest).FullName!, out object? property)) if (!transaction.Properties.TryGetValue(typeof(HttpRequest).FullName!, out object? property))
@ -48,7 +48,7 @@ public static class OpenIddictValidationAspNetCoreHelpers
/// Retrieves the <see cref="OpenIddictRequest"/> instance stored in <see cref="BaseContext"/>. /// Retrieves the <see cref="OpenIddictRequest"/> instance stored in <see cref="BaseContext"/>.
/// </summary> /// </summary>
/// <param name="context">The context instance.</param> /// <param name="context">The context instance.</param>
/// <returns>The <see cref="OpenIddictRequest"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="OpenIddictRequest"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static OpenIddictRequest? GetOpenIddictValidationRequest(this HttpContext context!!) public static OpenIddictRequest? GetOpenIddictValidationRequest(this HttpContext context!!)
{ {
return context.Features.Get<OpenIddictValidationAspNetCoreFeature>()?.Transaction?.Request; return context.Features.Get<OpenIddictValidationAspNetCoreFeature>()?.Transaction?.Request;
@ -58,7 +58,7 @@ public static class OpenIddictValidationAspNetCoreHelpers
/// Retrieves the <see cref="OpenIddictResponse"/> instance stored in <see cref="BaseContext"/>. /// Retrieves the <see cref="OpenIddictResponse"/> instance stored in <see cref="BaseContext"/>.
/// </summary> /// </summary>
/// <param name="context">The context instance.</param> /// <param name="context">The context instance.</param>
/// <returns>The <see cref="OpenIddictResponse"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="OpenIddictResponse"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static OpenIddictResponse? GetOpenIddictValidationResponse(this HttpContext context!!) public static OpenIddictResponse? GetOpenIddictValidationResponse(this HttpContext context!!)
{ {
return context.Features.Get<OpenIddictValidationAspNetCoreFeature>()?.Transaction?.Response; return context.Features.Get<OpenIddictValidationAspNetCoreFeature>()?.Transaction?.Response;

2
src/OpenIddict.Validation.DataProtection/OpenIddictValidationDataProtectionOptions.cs

@ -17,7 +17,7 @@ public class OpenIddictValidationDataProtectionOptions
/// <summary> /// <summary>
/// Gets or sets the data protection provider used to create the default /// Gets or sets the data protection provider used to create the default
/// data protectors used by the OpenIddict Data Protection validation services. /// data protectors used by the OpenIddict Data Protection validation services.
/// When this property is set to <c>null</c>, the data protection provider /// When this property is set to <see langword="null"/>, the data protection provider
/// is directly retrieved from the dependency injection container. /// is directly retrieved from the dependency injection container.
/// </summary> /// </summary>
public IDataProtectionProvider DataProtectionProvider { get; set; } = default!; public IDataProtectionProvider DataProtectionProvider { get; set; } = default!;

6
src/OpenIddict.Validation.Owin/OpenIddictValidationOwinHelpers.cs

@ -28,7 +28,7 @@ public static class OpenIddictValidationOwinHelpers
/// Retrieves the <see cref="IOwinRequest"/> instance stored in the <see cref="OpenIddictValidationTransaction"/> properties. /// Retrieves the <see cref="IOwinRequest"/> instance stored in the <see cref="OpenIddictValidationTransaction"/> properties.
/// </summary> /// </summary>
/// <param name="transaction">The transaction instance.</param> /// <param name="transaction">The transaction instance.</param>
/// <returns>The <see cref="IOwinRequest"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="IOwinRequest"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static IOwinRequest? GetOwinRequest(this OpenIddictValidationTransaction transaction!!) public static IOwinRequest? GetOwinRequest(this OpenIddictValidationTransaction transaction!!)
{ {
if (!transaction.Properties.TryGetValue(typeof(IOwinRequest).FullName!, out object? property)) if (!transaction.Properties.TryGetValue(typeof(IOwinRequest).FullName!, out object? property))
@ -56,7 +56,7 @@ public static class OpenIddictValidationOwinHelpers
/// Retrieves the <see cref="OpenIddictRequest"/> instance stored in <see cref="BaseContext"/>. /// Retrieves the <see cref="OpenIddictRequest"/> instance stored in <see cref="BaseContext"/>.
/// </summary> /// </summary>
/// <param name="context">The context instance.</param> /// <param name="context">The context instance.</param>
/// <returns>The <see cref="OpenIddictRequest"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="OpenIddictRequest"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static OpenIddictRequest? GetOpenIddictValidationRequest(this IOwinContext context!!) public static OpenIddictRequest? GetOpenIddictValidationRequest(this IOwinContext context!!)
=> context.Get<OpenIddictValidationTransaction>(typeof(OpenIddictValidationTransaction).FullName)?.Request; => context.Get<OpenIddictValidationTransaction>(typeof(OpenIddictValidationTransaction).FullName)?.Request;
@ -64,7 +64,7 @@ public static class OpenIddictValidationOwinHelpers
/// Retrieves the <see cref="OpenIddictResponse"/> instance stored in <see cref="BaseContext"/>. /// Retrieves the <see cref="OpenIddictResponse"/> instance stored in <see cref="BaseContext"/>.
/// </summary> /// </summary>
/// <param name="context">The context instance.</param> /// <param name="context">The context instance.</param>
/// <returns>The <see cref="OpenIddictResponse"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="OpenIddictResponse"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static OpenIddictResponse? GetOpenIddictValidationResponse(this IOwinContext context!!) public static OpenIddictResponse? GetOpenIddictValidationResponse(this IOwinContext context!!)
=> context.Get<OpenIddictValidationTransaction>(typeof(OpenIddictValidationTransaction).FullName)?.Response; => context.Get<OpenIddictValidationTransaction>(typeof(OpenIddictValidationTransaction).FullName)?.Response;
} }

4
src/OpenIddict.Validation.SystemNetHttp/OpenIddictValidationSystemNetHttpHelpers.cs

@ -17,7 +17,7 @@ public static class OpenIddictValidationSystemNetHttpHelpers
/// Gets the <see cref="HttpRequestMessage"/> associated with the current context. /// Gets the <see cref="HttpRequestMessage"/> associated with the current context.
/// </summary> /// </summary>
/// <param name="transaction">The transaction instance.</param> /// <param name="transaction">The transaction instance.</param>
/// <returns>The <see cref="HttpRequestMessage"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="HttpRequestMessage"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static HttpRequestMessage? GetHttpRequestMessage(this OpenIddictValidationTransaction transaction) public static HttpRequestMessage? GetHttpRequestMessage(this OpenIddictValidationTransaction transaction)
=> transaction.GetProperty<HttpRequestMessage>(typeof(HttpRequestMessage).FullName!); => transaction.GetProperty<HttpRequestMessage>(typeof(HttpRequestMessage).FullName!);
@ -25,7 +25,7 @@ public static class OpenIddictValidationSystemNetHttpHelpers
/// Gets the <see cref="HttpResponseMessage"/> associated with the current context. /// Gets the <see cref="HttpResponseMessage"/> associated with the current context.
/// </summary> /// </summary>
/// <param name="transaction">The transaction instance.</param> /// <param name="transaction">The transaction instance.</param>
/// <returns>The <see cref="HttpResponseMessage"/> instance or <c>null</c> if it couldn't be found.</returns> /// <returns>The <see cref="HttpResponseMessage"/> instance or <see langword="null"/> if it couldn't be found.</returns>
public static HttpResponseMessage? GetHttpResponseMessage(this OpenIddictValidationTransaction transaction) public static HttpResponseMessage? GetHttpResponseMessage(this OpenIddictValidationTransaction transaction)
=> transaction.GetProperty<HttpResponseMessage>(typeof(HttpResponseMessage).FullName!); => transaction.GetProperty<HttpResponseMessage>(typeof(HttpResponseMessage).FullName!);
} }

2
src/OpenIddict.Validation/OpenIddictValidationBuilder.cs

@ -121,7 +121,7 @@ public class OpenIddictValidationBuilder
{ {
// If the encryption key is an asymmetric security key, ensure it has a private key. // If the encryption key is an asymmetric security key, ensure it has a private key.
if (key is AsymmetricSecurityKey asymmetricSecurityKey && if (key is AsymmetricSecurityKey asymmetricSecurityKey &&
asymmetricSecurityKey.PrivateKeyStatus == PrivateKeyStatus.DoesNotExist) asymmetricSecurityKey.PrivateKeyStatus is PrivateKeyStatus.DoesNotExist)
{ {
throw new InvalidOperationException(SR.GetResourceString(SR.ID0055)); throw new InvalidOperationException(SR.GetResourceString(SR.ID0055));
} }

4
src/OpenIddict.Validation/OpenIddictValidationEvents.Discovery.cs

@ -82,7 +82,7 @@ public static partial class OpenIddictValidationEvents
} }
/// <summary> /// <summary>
/// Gets or sets the response, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the response, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictResponse? Response public OpenIddictResponse? Response
{ {
@ -200,7 +200,7 @@ public static partial class OpenIddictValidationEvents
} }
/// <summary> /// <summary>
/// Gets or sets the response, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the response, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictResponse? Response public OpenIddictResponse? Response
{ {

2
src/OpenIddict.Validation/OpenIddictValidationEvents.Introspection.cs

@ -92,7 +92,7 @@ public static partial class OpenIddictValidationEvents
} }
/// <summary> /// <summary>
/// Gets or sets the response, or <c>null</c> if it wasn't extracted yet. /// Gets or sets the response, or <see langword="null"/> if it wasn't extracted yet.
/// </summary> /// </summary>
public OpenIddictResponse? Response public OpenIddictResponse? Response
{ {

2
src/OpenIddict.Validation/OpenIddictValidationEvents.Protection.cs

@ -26,7 +26,7 @@ public static partial class OpenIddictValidationEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it is not available. /// Gets or sets the request, or <see langword="null"/> if it is not available.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {

2
src/OpenIddict.Validation/OpenIddictValidationEvents.cs

@ -195,7 +195,7 @@ public static partial class OpenIddictValidationEvents
} }
/// <summary> /// <summary>
/// Gets or sets the request, or <c>null</c> if it couldn't be extracted. /// Gets or sets the request, or <see langword="null"/> if it couldn't be extracted.
/// </summary> /// </summary>
public OpenIddictRequest? Request public OpenIddictRequest? Request
{ {

2
src/OpenIddict.Validation/OpenIddictValidationHelpers.cs

@ -17,7 +17,7 @@ public static class OpenIddictValidationHelpers
/// <typeparam name="TProperty">The type of the property.</typeparam> /// <typeparam name="TProperty">The type of the property.</typeparam>
/// <param name="transaction">The validation transaction.</param> /// <param name="transaction">The validation transaction.</param>
/// <param name="name">The property name.</param> /// <param name="name">The property name.</param>
/// <returns>The property value or <c>null</c> if it couldn't be found.</returns> /// <returns>The property value or <see langword="null"/> if it couldn't be found.</returns>
public static TProperty? GetProperty<TProperty>( public static TProperty? GetProperty<TProperty>(
this OpenIddictValidationTransaction transaction!!, string name) where TProperty : class this OpenIddictValidationTransaction transaction!!, string name) where TProperty : class
{ {

Loading…
Cancel
Save