Nonstandard JWT Token Support
The use of nonstandard JWT tokens is supported. The JSON content type is a
standard JWT token, while all other (for example, text or XML) are nonstandard JWT
tokens. To fetch nonstandard JWT tokens from a REST service, use the following
regex
string.
-
Use
regex
“.*”
if the entire content is a JWT token. For this example, the entire content of the sample HTTP response is JWT token.HTTP/1.1 200 OK Date: Wed Jul 4 15:38:53 2012 Connection: Keep-Alive: Content-Type: text/plain;charset=UTF-8 Content-Length: 148 MTgwNzE5NTY1NToxQkhzQlpaSXM0a21BV3NhbVBIclJOTFM4OGFxU09jNlRTdmFKSmczLVBqVHlWRF JwbWYxOFhmcnN6S0N6c3Fzb1JKbEh6U2IwSTdvflVuZWFXVjVmemhJNTJ1YVN6bFdDbTBG
-
Use
regex
“(?:.*?"my_token":")(.*?)(?:".*?)”
, if the JWT token is embedded inside a nonstandard response. For example,my_token
is shown in the following sample HTTP response in which the JWT token is embedded inside a nonstandard response. Thisregex
consists of a capturing group and noncapturing group. See https://www.regular-expressions.info/refcapture.html.HTTP/1.1 200 OK Date: Wed Jul 4 15:38:53 2012 Connection: Keep-Alive: Content-Type: text/plain;charset=UTF-8 Content-Length: 286 "name":"raw-jwt" "my_token":"MTgwNzE5NTY1NToxQkhzQlpaSXM0a21BV3NhbVBIclJOTFM4OGFxU09jNlRTdmFKSm czLVBqVHlWRFJwbWYxOFhmcnN6S0N6c3Fzb1JKbEh6U2IwSTdvflVuZWFXVjVmemhJNTJ1YVN6bFdD bTBG" "id":"8353"