0
I’m trying to collect two sets of characters in one token
authentication. The intention is that the regex
collect the word bearer
and the outcome of access_token
.
I’m having a hard time uniting both collections.
It is possible to perform both collect in the same regex?
Token below - Image and text.
{
"token_type": "bearer",
"refresh_token": "MjUwMDAwMTJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIzNTMxMzI1MDAwMDE2NiIsImlhdCI6MTYxMjUzMjE2NSwibmJmIjoxNjEyNTMyMTY1LCJleHAiOjE2MTI1MzU3NjUsImNsaWVudF9pZCI6Im1vYmlsZUZpcnN0RGF0YSIsInVzZXJfbmFtZSI6IjM1MzEzMjUwMDAwMTY2IiwiaW5zdGl0dXRpb24iOiIwMDAwMDAwMyIsImVzdGFibGleyJ0eXAiOijpbIjg5NDUwNDIzIl0sImRldmljZSI6IlBvc3RtYW4iLCJ0b2tlbl90eXBlIjoicmVmcmVzaCIsIm9yaWdpbl9wb3MiOmZhbHNlfQ.CEwEPwRXNN0OrcYk7rc2FFzPwMGPhOKnjUUfuR97bN7hfmwEMp_dQQ4mLRod4xuv32xlEFLPvmxtiM-9IiA53w",
"refresh_expires_in": 3600,
"expires_in": 900,
"access_token": "osjjjjsssjJKV1QiLCJhbGciOiJIUzUxMiJ9.eyJzdWIiOiIzNTMxMzI1MDAwMDE2NiIsImlhdCI6MTYxMjUzMjE2NSwibmJmIjoxNjEyNTMyMTY1LCJleHAiOjE2MTI1MzMwNjUsImNsaWVudF9pZCI6Im1vYmlsZUZpcnN0RGF0YSIsInVzZXJfbmFtZSI6IjM1MzEzMjeyJ0eXAiOiIiwiaW5zdGl0dXRpb24iOiIwMDAwMDAwMyIsImVzdGFibGlzaG1lbnRzIjpbIjg5NDUwNDIzIl0sImRldmljZSI6IlBvc3RtYW4ifQ._gEPrD2KsX1sFUwPmGSL0ZORSDRypwFd3u0Z-YhUowvE3iqDK0I_dpdkf_azCIUqs4JNpmj-zkKtmieRIz6afQ",
"accepted_contract_term": true,
"is_origin_pos": false
}
Is there a reason not to parse the json, and access the values via
get
using a programming language?– Danizavtz
@Danizavtz, thanks for the reply. It has been suggested to use json, however, according to the Zabbix forum, the web scenarios do not support. This way I’m insisting with the regex.
– Alan Dias