Hi,
In my use-case I am trying to add some custom attributes to the OAuth token that I am generating. Hence I am using the following piece of code:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<OAuthV2 async="false" continueOnError="false" enabled="true" name="Generate-Access-Token">
<DisplayName>Generate-Access-Token</DisplayName>
<ExternalAuthorization>false</ExternalAuthorization>
<Operation>GenerateAccessToken</Operation>
<SupportedGrantTypes>
<GrantType>password</GrantType>
</SupportedGrantTypes>
<Attributes>
<Attribute name="custom-tags" ref="registered.custom-tags"/>
</Attributes>
<GenerateResponse enabled="true"/>
<Tokens/>
</OAuthV2>
Now when I make a call to it, I get the “custom-tags” as another attribute in the token returned.
This works good as long as “custom-tags” is a string. How do I insert a JSON node segment there?
For e.g., I need to add the following custom attributes:
"custom-tags": {"name": "Ritwik", "id":"1234"}
Update: I have posted another question here. I believe these 2 are related.
