Add claim with slash characters in token inline hook response

In the JSON response returned by a token inline hook, the path property uses / characters as the delimiter. The Okta documentation gives the following examples:

{ "op": "add", "path": "/claims/extPatientId", "value": "..." },
{ "op": "add", "path": "/claims/employee_profile/department_id", "value": "..." }

How can I include a claim whose name contains / characters, without the slashes being misinterpreted as path delimiters? To be specific, I need to specify the following claim:

Hi @mliu-st, you can specify a claim name to be a URI by escaping it as a JSON Pointer RFC 6901: JavaScript Object Notation (JSON) Pointer
For your example, you would specify the path as /claims/

1 Like

This topic was automatically closed 24 hours after the last reply. New replies are no longer allowed.