# SSO credentials validity / forced logout

**URL:** https://meta.discourse.org/t/sso-credentials-validity-forced-logout/126874
**Category:** WordPress
**Created:** [26 augustus 2019 om 21:31 UTC](https://meta.discourse.org/t/sso-credentials-validity-forced-logout/126874 "2019-08-26T21:31:23Z")
**Posts on this page:** 1
**Showing post:** 17

<div class="post-metadata">

### Author: ![Cardinalflyer](https://avatars.discourse-cdn.com/v4/letter/c/f14d63/32.png) [@Cardinalflyer](https://meta.discourse.org/u/Cardinalflyer)
#### Post date: [26 november 2019 om 22:47 UTC](https://meta.discourse.org/t/sso-credentials-validity-forced-logout/126874/17 "2019-11-26T22:47:13Z")

</div>

I think I’m close, using simple PHP commands. The code is below. The username choice came from [this post](https://meta.discourse.org/t/api-username-query/60227/6).

I’m getting this response… does this mean anything to anyone? Seems like an SSL protocol version thing?

`error:1407742E:SSL routines:SSL23_GET_SERVER_HELLO:tlsv1 alert protocol version`

Here is my code:

```
    $url = "https://community.mysite.com/admin/users/100004/log_out";
    $headers = array( 'Api-Key' => 'd412mylongadminkeyaadcd',
    				  'Api-Username' => 'system',
    				  );

	$ch = curl_init();
	curl_setopt($ch, CURLOPT_URL, $url);

[edit: added these lines too, no change:]
	curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
	curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
[/edit]

	curl_setopt($ch, CURLOPT_POST, true);
	curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    $data = curl_exec($ch);
    if (curl_errno($ch)) {
        echo curl_error($ch);
    }
    curl_close($ch);

```

---

_[View the full topic](https://meta.discourse.org/t/sso-credentials-validity-forced-logout/126874)._
