Microsoft.IdentityModel.Tokens
Namespace with 107 public types
Classes
AsymmetricSignatureProvider
Provides signature and verification operations for Asymmetric Algorithms using a .
AuthenticatedEncryptionProvider
Provides authenticated encryption and decryption services.
AuthenticatedEncryptionResult
Contains the results of operation.
CallContext
An opaque context used to store work when working with authentication artifacts.
CaseSensitiveClaimsIdentity
A derived where claim retrieval is case-sensitive. The current retrieves claims in a case-insensitive manner which is different than querying the underlying . The provides consistent retrieval logic between the and .
Cnf
Represents the Cnf Claim
CompressionAlgorithms
Constants for compression algorithms.
CompressionProviderFactory
Compression provider factory for compression and decompression.
CryptoProviderCacheOptions
Specifies the CryptoProviderCacheOptions which can be used to configure the internal cryptoprovider cache.
We are using our own simple LRU caching implementation across all targets.
See for more details.
CryptoProviderFactory
Creates cryptographic operators by specifying a 's and algorithms.
DeflateCompressionProvider
A compression provider that supports compression and decompression using the algorithm.
EcdhKeyExchangeProvider
Provides a Security Key that can be used as Content Encryption Key (CEK) for use with a JWE
ECDsaSecurityKey
Represents a ECDsa security key.
EncryptingCredentials
A class for properties that are used for token encryption.
InMemoryCryptoProviderCache
Defines a cache for crypto providers.
Current support is limited to only.
JsonWebKey
Represents a JSON Web Key as defined in https://datatracker.ietf.org/doc/html/rfc7517.
JsonWebKeyConverter
Converts a into a
Supports: converting to a from one of: , , and .
JsonWebKeySet
Contains a collection of that can be populated from a json string.
MlDsaSecurityKey
Represents an ML-DSA security key.
RSACryptoServiceProviderProxy
The purpose of this class is to ensure that we obtain an RsaCryptoServiceProvider that supports SHA-256 signatures.
If the original RsaCryptoServiceProvider doesn't support SHA-256, we create a new one using the same KeyContainer.
RsaKeyWrapProvider
Provides RSA Wrap key and Unwrap key services.
RsaSecurityKey
Represents a Rsa security key.
SecurityKeyIdentifierClause
Contains information about the keys inside the tokens.
SecurityTokenArgumentException
Throw this exception when a received has invalid arguments.
SecurityTokenCompressionFailedException
Thrown when JWE compression fails.
SecurityTokenDecompressionFailedException
Thrown when JWE decompression fails.
SecurityTokenDecryptionFailedException
Represents a security token exception when decryption failed.
SecurityTokenDescriptor
Contains some information which used to create a security token.
SecurityTokenEncryptionFailedException
Represents a security token exception when encryption failed.
SecurityTokenEncryptionKeyNotFoundException
This exception is thrown when a security token contained a key identifier but the key was not found by the runtime
when decrypting a token.
SecurityTokenException
Represents a security token exception.
SecurityTokenExpiredException
Throw this exception when a received Security Token has expiration time in the past.
SecurityTokenInvalidAlgorithmException
This exception is thrown when a cryptographic algorithm is invalid.
SecurityTokenInvalidAudienceException
This exception is thrown when 'audience' of a token was not valid.
SecurityTokenInvalidCloudInstanceException
This exception is thrown when the cloud instance of the signing key was not matched with the cloud instance from configuration.
SecurityTokenInvalidIssuerException
This exception is thrown when 'issuer' of a token was not valid.
SecurityTokenInvalidLifetimeException
This exception is thrown when 'lifetime' of a token was not valid.
SecurityTokenInvalidSignatureException
This exception is thrown when 'signature' of a token was not valid.
SecurityTokenInvalidSigningKeyException
Throw this exception when a received Security Token has an invalid issuer signing key.
SecurityTokenInvalidTypeException
This exception is thrown when the token type ('typ' header claim) of a JWT token is invalid.
SecurityTokenKeyWrapException
Represents a key wrap exception when encryption failed.
SecurityTokenMalformedException
Represents a exception when the token is malformed.
SecurityTokenNoExpirationException
This exception is thrown when a security is missing an ExpirationTime.
SecurityTokenNotYetValidException
Throw this exception when a received Security token has an effective time
in the future.
SecurityTokenReplayAddFailedException
This exception is thrown when an add to the TokenReplayCache fails.
SecurityTokenReplayDetectedException
Throw this exception when a received Security Token has been replayed.
SecurityTokenSignatureKeyNotFoundException
This exception is thrown when a security token contained a key identifier but the key was not found by the runtime.
SecurityTokenUnableToValidateException
This exception is thrown when a security token contained a key identifier but the key was not found by the runtime
and when validation errors exist over the security token. This exception is not intended to be used as a signal
to refresh keys.
SecurityTokenValidationException
Represents a security token validation exception.
SigningCredentials
Defines the , algorithm and digest for digital signatures.
SymmetricKeyWrapProvider
Provides Wrap and Unwrap key services.
SymmetricSecurityKey
Represents a symmetric security key.
SymmetricSignatureProvider
Provides signing and verifying operations using a and specifying an algorithm.
TokenContext
An opaque context used to store work when working with authentication artifacts.
TokenValidationParameters
Contains a set of parameters that are used by a when validating a .
TokenValidationResult
Contains artifacts obtained when a SecurityToken is validated.
A SecurityTokenHandler returns an instance that captures the results of validating a token.
X509EncryptingCredentials
An designed to construct based on a x509 certificate.
X509SecurityKey
An that is backed by a
X509SigningCredentials
Defines the , algorithm and digest for digital signatures.
Enumerations
JwtSegmentType
Specifies the segment of a JWT.
PrivateKeyStatus
Enum for the existence of private key
ValidationFailure
The reason for being unable to validate
Static Classes
AppCompatSwitches
Identifiers used for switching between different app compat behaviors within the Microsoft.IdentityModel libraries.
Base64UrlEncoder
Encodes and Decodes strings as base64url encoding.
ConfirmationClaimTypes
Confirmation Claim ("cnf") related constants
https://datatracker.ietf.org/doc/html/rfc7800
DateTimeUtil
Utility class for performing operations involving and .
EpochTime
Returns the absolute DateTime or the Seconds since Unix Epoch, where Epoch is UTC 1970-01-01T0:0:0Z.
JsonWebAlgorithmsKeyTypes
Constants for JsonWebAlgorithms "kty" Key Type (sec 6.1)
https://datatracker.ietf.org/doc/html/rfc7518#section-6.1
JsonWebKeyECTypes
Constants for JsonWebKey Elliptical Curve Types
https://datatracker.ietf.org/doc/html/rfc7518#section-6.2.1.1
JsonWebKeyParameterNames
JsonWebKey parameter names
see: https://datatracker.ietf.org/doc/html/rfc7517
JsonWebKeySetParameterNames
Names for Json Web Key Set Values
JsonWebKeyUseNames
Constants for JsonWebKeyUse (sec 4.2)
https://datatracker.ietf.org/doc/html/rfc7517#section-4.2
SecurityAlgorithms
Constants for Security Algorithm.
UniqueId
Generates unique IDs.
Utility
Contains some utility methods.
Validators
Partial class for Algorithm Validation.
Abstract Classes
AsymmetricSecurityKey
Base class for a that contains Asymmetric key material.
BaseConfiguration
Represents a generic metadata configuration which is applicable for both XML and JSON based configurations.
BaseConfigurationManager
Represents a generic configuration manager.
CryptoProviderCache
Abstract definition of a cache for cryptographic providers.
KeyWrapProvider
Provides Wrap and Unwrap key services.
SecurityKey
Base class for Security Key.
SecurityToken
Base class for security token.
SecurityTokenHandler
Defines the interface for a Security Token Handler.
SignatureProvider
Provides signature services, signing and verifying.
TokenHandler
Defines properties shared across all security token handlers.
Interfaces
ICompressionProvider
Provides methods for compressing and decompressing data.
ICryptoProvider
Provides extensibility for cryptographic operators.
If custom operators are needed, can be set to return these operators.
This property will be checked before each creation.
ISecurityTokenValidator
ISecurityTokenValidator
ITokenReplayCache
Interface that defines a simple cache for tacking replaying of security tokens.