"; print ''; print ''; print '

Oauth2 Token Endpoint Static Test

'; if (isset($_POST['run'])) { $results = array(); $valid = pingIdentityOauth2PasswordAuthentication($url, $clientID, 'Tim Cook', 'iphone5', $results, true); print '

Testing Invalid User : Tim Cook

'; print '

JSON

'; print "{$results['HTTPResponseBody']}
"; $resultsStr = var_export($results, true); print '

PHP Decoded Results

'; print "
$resultsStr
"; print '
'; $results = array(); $valid = pingIdentityOauth2PasswordAuthentication($url, $clientID, $username, $password, $results, true); print "

Testing Valid User : $username

"; print '

JSON

'; print "{$results['HTTPResponseBody']}
"; $resultsStr = var_export($results, true); print '

PHP Decoded Results

'; print "
$resultsStr
"; $accessToken = $results['access_token']; $results = array(); $valid = pingIdentityOauth2ValidateBearer($url, $bearerClientID, $bearerSecret, $accessToken, $results, true); print "

Testing Validate Bearer : $accessToken

"; print '

JSON

'; print "{$results['HTTPResponseBody']}
"; $resultsStr = var_export($results, true); print '

PHP Decoded Results

'; print "
$resultsStr
"; } print '
'; print '
'; print ''; print '
'; print ''; print ""; ?>