There are two options to make custom field/data part of the access token itself:
1. use access token as JWT. In this case you can encode any data inside JWT (client's `accessTokenAsJwt=true` and `runIntrospectionScriptBeforeAccessTokenAsJwtCreationAndIncludeClaims=true`)
2. use `UpdateTokenType` and modify token code in both `TokenEntity` and `AccessToken` object.
Note that in latest jans we support pure Java scripts (not only jython), see https://github.com/JanssenProject/jans/wiki/Interception-scripts--(or--Custom-scripts)#using-pure-java-scripts
Introspection script sample:
https://github.com/JanssenProject/jans/blob/4babe55a494c0edad899776f086d8c59368031f2/jans-linux-setup/jans_setup/static/extension/introspection/introspection.py#L11
UpdateTokenType sample:
https://github.com/JanssenProject/jans/blob/4babe55a494c0edad899776f086d8c59368031f2/jans-linux-setup/jans_setup/static/extension/update_token/sample_script.py#L10
Hope it helps.
Thanks,
Yuriy Z