JSON Web Token (JWT) Parser
Problem this snippet solves: This feature is now native in v13.1 and it is strongly recommended you implement the native solution instead. This code is left only as an example for future use cases, ...
Published Apr 27, 2017
Version 1.0Graham_Alderso1
Employee
Joined May 22, 2019
Graham_Alderso1
Employee
Joined May 22, 2019
Marvin
Oct 22, 2020Cirrocumulus
Hi graham I got the Irule working as a workaround, I did need to trim the payload variable name because it had spaces in the name preventing it from being created like this.
session.oauth.jwt.payload.last. value is dehaasm
So I added one line to trim the variable name and now it works. I would like to prefer if this information is saved inside the F5 code by default as you stated. Thanks for sharing the Irule.
#Set APM session variables for each payload parameter
foreach parameter $jwt_payload_modified {
set variable_name [getfield $parameter ":" 1]
set variable_name_trim [string trim $variable_name]
set variable_value [getfield $parameter ":" 2]