Click or drag to resize
IJwtTokenServiceTryParseToken Method
Parses and validates a JWT token provided by tokenString parameter.

Namespace: CMS.Base.Internal
Assembly: CMS.Base (in CMS.Base.dll) Version: 13.0.131
Syntax
C#
bool TryParseToken(
	string tokenString,
	out ClaimsPrincipal claimsPrincipal,
	out bool tokenExpired
)

Parameters

tokenString
Type: SystemString
Token string encoded as JWE or JWS.
claimsPrincipal
Type: System.Security.ClaimsClaimsPrincipal
Claims-based identity parsed from token.
tokenExpired
Type: SystemBoolean
Returns True when tokenString has expiration time in the past.

Return Value

Type: Boolean
Returns True whether the operation succeeded.
Exceptions
ExceptionCondition
ArgumentNullExceptionThrows when tokenString is null or whitespace.
See Also