crantpy.utils.cave.auth module

crantpy.utils.cave.auth module#

This module provides utility functions for cave-related authentication and authorization.

crantpy.utils.cave.auth.generate_cave_token(save=False)[source]#

Generates a token for the CAVE client. If save is True, the token will be saved (overwriting any existing token).

Parameters:

save (bool, default False) – Whether to save the token after generation.

Return type:

None

crantpy.utils.cave.auth.get_current_cave_token()[source]#

Retrieves the current token from the CAVE client.

Returns:

The current CAVE token.

Return type:

str

Raises:

ValueError – If no token is found.

crantpy.utils.cave.auth.set_cave_token(token)[source]#

Sets the CAVE token for the CAVE client.

Parameters:

token (str) – The CAVE token to set.

Return type:

None