Click or drag to resize

JsonWebTokenUtilityValidateSecurityToken Method

Validates the a Json Web Token (Security token) from given encoded token and signing key.

Namespace:  Hummingbird.TestFramework.Util
Assembly:  Hummingbird.TestFramework (in Hummingbird.TestFramework.dll) Version: 1.2.0.0
Syntax
public static void ValidateSecurityToken(
	string encodedToken,
	string algorithm,
	string symmetricKey,
	KeyFormat keyFormat,
	X509Certificate2 certificate
)

Parameters

encodedToken
Type: SystemString
The encoded Json Web Token.
algorithm
Type: SystemString
The signing algorithm: HS256, RS384, ES512, ...
symmetricKey
Type: SystemString
The symmetric key used to sign the token, if symmetric algorithm is used: HS256, HS384, HS512
keyFormat
Type: Hummingbird.TestFramework.UtilKeyFormat
The key format there is symmetric key is represented
certificate
Type: System.Security.Cryptography.X509CertificatesX509Certificate2
The X509 certificate containing the private key, Represents a PKCS#12/PFX certificate.
Exceptions
ExceptionCondition
NotSupportedExceptionThe given signing algorithm is not supported
See Also