Compare View

switch
from
...
to
 
Commits (2)

Changes

Showing 2 changed files Side-by-side Diff

... ... @@ -39,4 +39,10 @@ if ($access_token != '') {
39 39 $email = $ssoUserInfo->email;
40 40 }
41 41  
  42 +```
  43 +
  44 +```$php
  45 +$url_back = {return_url};
  46 +$objSso = new SsoClientLibrary();
  47 +$objSso->ssoLogout($url_back);
42 48 ```
43 49 \ No newline at end of file
src/SsoClientLibrary.php
... ... @@ -125,4 +125,14 @@ class SsoClientLibrary {
125 125 die('Something went wrong, please trace back your action!');
126 126 }
127 127  
  128 + public function ssoLogout($url_back = '') {
  129 + $query = http_build_query([
  130 + 'url_back' => $url_back,
  131 + ]);
  132 +
  133 + $_url = $this->targetUri ."sso/logout?" . $query;
  134 + header("Location: " . $_url);
  135 + die();
  136 + }
  137 +
128 138 }
129 139 \ No newline at end of file