Create following policy. Use Decode JSON Web Token Assertion Return custom error if we receive malformed JWT request.
Do the folloing case 01. Results of normal JWT 02. Results when adding two or more letters to a normal JWT to make it into an incorrect JWT format 03. Results when deleting part of characters from normal JWT and making it into an incorrect JWT format 04. Results when adding one character to normal JWT to make it into an incorrect JWT format
Result: 01. Return 200 OK , Policy is successful 02. Return custom error , Policy is successful 03. Return custom error , Policy is successful 04. Return 500 error , Policy failed