You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are testing against SecurityTokenMalformedException coming from Microsoft.IdentityModel.Tokens namespace. The inner exception of it is throwing the following error while test is running:
Expected inner exception (level 2) message to be "Value does not fall within the expected range.", but found "IDX12709: CanReadToken() returned false. JWT is not well formed.
The token needs to be in JWS or JWE Compact Serialization Format. (JWS): 'EncodedHeader.EncodedPayload.EncodedSignature'. (JWE): 'EncodedProtectedHeader.EncodedEncryptedKey.EncodedInitializationVector.EncodedCiphertext.EncodedAuthenticationTag'."
The Ask
I don't want the library to go as deep. How can I ignore the validation after 1 level starting from system exception
The text was updated successfully, but these errors were encountered:
@ElbekDeveloper, this is expected behaviour. Is this for a unit test? You should be able to setup your expected exception to be thrown by the unit test and then verify that the actual exception match the expected exception.
The Problem
We are testing against
SecurityTokenMalformedException
coming from Microsoft.IdentityModel.Tokens namespace. The inner exception of it is throwing the following error while test is running:The Ask
I don't want the library to go as deep. How can I ignore the validation after 1 level starting from system exception
The text was updated successfully, but these errors were encountered: