ServiceNow connector deployment guide 1.0.0.0

OpenAM Validate OAuth token – java code

public static void validateOAuthToken(String token) {

Client client = Client.create();
WebResource webResource = client.resource(OPENAM_HOST+”/oauth2/tokeninfo?access_token=”+token);

ClientResponse response = webResource.type(MediaType.APPLICATION_FORM_URLENCODED).get(ClientResponse.class);

String output = response.getEntity(String.class);
System.out.println(response.getStatus());
System.out.println(“>> access token info>>”+output);
}