If you request the "openid" scope you will get an access token along with a JWT token called "id_token". The JWT contains the user name.
You can also use the access token to call out to the userinfo endpoint - which will return a json response with the username.
For more details.
There is a sample application that comes with the OpenAM source code. See https://wikis.forgerock.org/confluence/display/openam/OAuth+2.0%3A+Get+Started+with+the+Demo+Client for information on how to install it.