Bug description
The out of the box sample OAuth2 Access Token Modification Script contains an error. Line 75 refers to
"Remove a native field from the token entry, that was set by AM. For complete list of remove* methods see the JavaDoc for org.forgerock.oauth2.core.AccessToken class" It then lists the following method:
accessToken.removeTokenName()
This method should be accessToken.removeField()
How to reproduce the issue
Edit OAuth2 Access Token Modification Script in attempt to remove a claim we ship by default.
Expected behaviour
Remove a specified claim
Current behaviour
Removes name of token
Work around
Use accessToken.removeField() method instead of accessToken.removeName() method.