Start of change

Log out of the z/OSMF server

You can use the DELETE method to log out of the z/OSMF server and delete the user's authentication tokens (JSON Web Tokens and LTPA tokens). Your request cookie must include a valid JSON Web Token or LTPA token (or both).

HTTP method and URI path

DELETE /zosmf/services/authenticate
Where:
  • /zosmf/services specifies the z/OSMF REST services API.
  • /authenticate indicates an authentication request.

Query parameters

None.

Standard headers

Use the following standard HTTP header with this request:
Content-Type: application/x-www-form-urlencoded

Customer headers

X-CSRF-ZOSMF-HEADER
This header is required for both browser and non-browser applications. Set the header to any value or an empty string (""). For more information, see Allowing cross-site access to REST services.

Request body

None.

Response Body

None.

Required authorizations

See Required authorizations.

Usage considerations

See Usage considerations for the z/OSMF REST services.

Expected response

Start of changeOn completion, the service returns an HTTP response, which includes a status code that indicates whether your request completed. Status code 204 indicates success. A status code of 4nn or 5nn indicates that an error occurred.End of change

Example

In the following example, the DELETE method is used to delete all the authenticated tokens when user logs out.
Figure 1. Delete the JSON Web Tokens for this user
DELETE /zosmf/services/authenticate
Content-Type: application/x-www-form-urlencoded
X-CSRF-ZOSMF-HEADER: ZOSMF
Referer: https://your.company.com/zosmf
cache-control: no-cache
Host: your.company.com
cookie:"jwtToken=eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJ0b2tlbl90eXBlIjoiQmVhcmVyIiwic3ViIjoiem9zbWZh
ZCIsInVwbiI6Inpvc21mYWQiLCJncm91cHMiOlsiQ0VBR1AiLCJDUE9DVFJMIiwiQ1BPUVVFUlkiLCJJWlVBRE1JTiIsIld
MTUdSUCIsIkJNQ0ZHIl0sInJlYWxtIjoiU0FGUmVhbG0iLCJpc3MiOiJ6T1NNRiIsImV4cCI6MTU0ODg2MTM0NiwiaWF0I
joxNTQ4ODMxOTQ2fQ.Bfc9MqPSRfn-rz0Gryf_24klKD8rqZB0TWwYwYB9osdKpFDbS2wKtqKMyBx6gcPX649Uk9mh
SJlVEAz71AOgOLi9kA28rMj1mQZbimkzNzXEPPqP37HG5Ve8aGvtxCdsyPKUQAQC9DRCdB-MGLjwCaLokRI7BjtDhriwk
Kl7yBVAxOGV7Gs8arFQzsTZSlRj3VWJ-wpuOJATRUCsjBLPE7inZzxzGIlh0eyM0K_0EH6YB_RTEsdf2lSbNy36dA2aJaa
YHLw9j1-fJ1VNwMf4ipFy_x2em8bdLYIhVT0ujLtjWmd2M9dEnYGs_rt6xpKfBCILnN0yXowrrWEchEPE1Q"
 

End of change