proxystore.globus.client¶
Create Globus Auth clients.
get_confidential_app_auth_client() ¶
get_confidential_app_auth_client(
client_id: str | None = None,
client_secret: str | None = None,
) -> globus_sdk.ConfidentialAppAuthClient
Create a confidential application authentication client.
Note
See the Globus SDK docs to learn how to create a confidential application and get the ID and secret.
Note
This function will not perform the OAuth2 flow.
Parameters:
-
client_id(str | None, default:None) –Client ID. If either
client_idorclient_secretisNone, the values will be read from thePROXYSTORE_GLOBUS_CLIENT_IDandPROXYSTORE_GLOBUS_CLIENT_SECRETenvironment variables. -
client_secret(str | None, default:None) –Client secret.
Returns:
-
ConfidentialAppAuthClient–Authorization client.
Raises:
-
ValueError–if
client_idorclient_secretare not provided and one or both ofPROXYSTORE_GLOBUS_CLIENT_IDandPROXYSTORE_GLOBUS_CLIENT_SECRETare not set. -
ValueError–if the provided
client_idor ID read from the environment is not a valid UUID.
Source code in proxystore/globus/client.py
get_native_app_auth_client() ¶
get_native_app_auth_client(
client_id: str = _PROXYSTORE_GLOBUS_APPLICATION_ID,
app_name: str = "proxystore-client",
) -> globus_sdk.NativeAppAuthClient
Create a native app authentication client.
Note
This function will not perform the OAuth2 flow.
Parameters:
-
client_id(str, default:_PROXYSTORE_GLOBUS_APPLICATION_ID) –Application ID. Defaults to the ProxyStore application ID.
-
app_name(str, default:'proxystore-client') –Application name.
Returns:
-
NativeAppAuthClient–Authorization client.
Source code in proxystore/globus/client.py
is_client_login() ¶
Check if Globus client identity environment variables are set.
Based on the Globus Compute SDK's
is_client_login().
Returns:
-
bool–TrueifPROXYSTORE_GLOBUS_CLIENT_IDandPROXYSTORE_GLOBUS_CLIENT_SECRETare set.