title: how to revoke on logout in php and able to get login page with PingFedarate?
body: <p>I am Using OAuth2 of PingFedarate I am able to successfully log in. Now is the question of how to call the API to log out and what is the parameter for that? Below is the example code I am using for revoke using curl request.</p>
  <p>When I run the revoke script, it deletes the <code>access_token</code> and shows that the configuration failed.</p>
  <p>But when I run my OAuth2 main script for login it automatically gets logged in: a new token is generated. In the below code refresh code when I revoke the token, I should get my login page to enter the login credentials again but it is not happening.</p>
  <pre class="lang-php prettyprint-override"><code>$objectData=array();$curl=curl_init();define('OAUTH2_TOKEN_URL','https://abcd.com/as/revoke_token.oauth2?');define('OAUTH2_CLIENT_ID', 'abcd');define('OAUTH2_ACCESS_TOKEN', 'hfefhhjfhj');define('OAUTH2_ACCESS_TOKEN_HINT_TYPE','refresh_token');define('OAUTH2_CLIENT_SECRET','bhfbfhjbhjbjbnvjevfbrfhrefbjebf');define('OAUTH2_REDIRECT_URI', 'https://www.abcde.com/Oauth/PingRedirect.php');define('OAUTH2_GRANT_TYPE', 'authorization_code');
  
  $params = array(CURLOPT_URL =&gt;  OAUTH2_TOKEN_URL.&quot;client_id=&quot;.OAUTH2_CLIENT_ID.&quot;&amp;token=&quot;.OAUTH2_ACCESS_TOKEN.&quot;&amp;token_type_hint=&quot;.OAUTH2_ACCESS_TOKEN_HINT_TYPE.&quot;&amp;client_secret=&quot;.OAUTH2_CLIENT_SECRET.&quot;&amp;redirect_uri=&quot;.OAUTH2_REDIRECT_URI,CURLOPT_RETURNTRANSFER =&gt; true,CURLOPT_MAXREDIRS =&gt; 10,CURLOPT_TIMEOUT =&gt; 30,CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,CURLOPT_CUSTOMREQUEST =&gt; &quot;POST&quot;,CURLOPT_NOBODY =&gt; false,CURLOPT_HTTPHEADER =&gt; array(&quot;cache-control: no-cache&quot;,&quot;content-type: application/x-www-form-urlencod&quot;,accept: *&quot;,&quot;accept-encoding: gzip, deflate&quot;,),);curl_setopt_array($curl, $params);$response = curl_exec($curl);$objectData=json_decode($response);
  </code></pre>