Browse Source

Backport the token manager changes to OpenIddict 1.x

pull/553/head
Kévin Chalet 9 years ago
parent
commit
d004af6c77
  1. 3
      src/OpenIddict.Core/Managers/OpenIddictTokenManager.cs

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

@ -584,7 +584,8 @@ namespace OpenIddict.Core
throw new ArgumentException("The token type cannot be null or empty.", nameof(descriptor)); throw new ArgumentException("The token type cannot be null or empty.", nameof(descriptor));
} }
if (!string.Equals(descriptor.Type, OpenIdConnectConstants.TokenTypeHints.AuthorizationCode, StringComparison.OrdinalIgnoreCase) && if (!string.Equals(descriptor.Type, OpenIdConnectConstants.TokenTypeHints.AccessToken, StringComparison.OrdinalIgnoreCase) &&
!string.Equals(descriptor.Type, OpenIdConnectConstants.TokenTypeHints.AuthorizationCode, StringComparison.OrdinalIgnoreCase) &&
!string.Equals(descriptor.Type, OpenIdConnectConstants.TokenTypeHints.RefreshToken, StringComparison.OrdinalIgnoreCase)) !string.Equals(descriptor.Type, OpenIdConnectConstants.TokenTypeHints.RefreshToken, StringComparison.OrdinalIgnoreCase))
{ {
throw new ArgumentException("The specified token type is not supported by the default token manager."); throw new ArgumentException("The specified token type is not supported by the default token manager.");

Loading…
Cancel
Save