Logging out

From DreamFactory
Jump to: navigation, search
(Created page with "### Tutorial There are two APIs available for logging out of an authenticated session - * DELETE api/v2/system/admin/session * DELETE api/v2/user/session ### API Endpoints...")
(Logging out as a User (non-admin))
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
### Tutorial
+
For these examples, assume your current session token is abc.123.efg.
  
There are two APIs available for logging out of an authenticated session -
+
=== Logging out as an Admin ===
* DELETE api/v2/system/admin/session
+
* DELETE api/v2/user/session
+
  
### API Endpoints
+
The Admin logout API endpoint is api/v2/system/admin/session
  
<pre>DELETE https://your-url/api/v2/system/admin/session?session_token=<jwt_session_token_to_blacklist></pre>
+
Request URL:
 
+
-- OR --
+
 
+
<pre>DELETE https://your-url/api/v2/user/session?session_token=<jwt_session_token_to_blacklist></pre>
+
  
 +
<pre>DELETE https://foo.com/api/v2/system/admin/session?session_token=abc.123.efg</pre>
  
 
Note: Session token can also be supplied using X-DreamFactory-Session-Token request header.
 
Note: Session token can also be supplied using X-DreamFactory-Session-Token request header.
  
### Example - Logging out
+
=== Logging out as a User (Non-Admin) ===
  
<pre>DELETE https://your-url/api/v2/system/admin/session?session_token=abc.123.efg</pre>
+
The non-admin logout API endpoint is api/v2/user/session
  
-- OR --
+
Request URL:
  
<pre>DELETE https://your-url/api/v2/user/session?session_token=abc.123.efg</pre>
+
<pre>DELETE https://foo.com/api/v2/user/session?session_token=abc.123.efg</pre>
 +
 
 +
Note: Session token can also be supplied using X-DreamFactory-Session-Token request header.

Latest revision as of 20:39, 14 July 2016

For these examples, assume your current session token is abc.123.efg.

Logging out as an Admin

The Admin logout API endpoint is api/v2/system/admin/session

Request URL:

DELETE https://foo.com/api/v2/system/admin/session?session_token=abc.123.efg

Note: Session token can also be supplied using X-DreamFactory-Session-Token request header.

Logging out as a User (Non-Admin)

The non-admin logout API endpoint is api/v2/user/session

Request URL:

DELETE https://foo.com/api/v2/user/session?session_token=abc.123.efg

Note: Session token can also be supplied using X-DreamFactory-Session-Token request header.