session#

The following methods allow for interaction with the ZDX Session API endpoints.

Methods are accessible via zdx.session

class SessionAPI#
create_token(client_id, client_secret)#

Creates a ZDX authentication token.

Parameters:
  • client_id (str) – The ZDX API Key ID.

  • client_secret (str) – The ZDX API Key Secret.

Returns:

The authenticated session information.

Return type:

Box

Examples

>>> zia.session.create(client_id='999999999',
...    client_secret='admin@example.com')
get_jwks()#

Returns a JSON Web Key Set (JWKS) that contains the public keys that can be used to verify the JWT tokens.

Returns:

The JSON Web Key Set (JWKS).

Return type:

Box

Examples

>>> jwks = zdx.session.get_jwks()
validate_token()#

Validates the current ZDX JWT token.

Returns:

The validated session information.

Return type:

Box

Examples

>>> validation = zdx.session.validate()