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,
) -> 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_id
orclient_secret
isNone
, the values will be read from thePROXYSTORE_GLOBUS_CLIENT_ID
andPROXYSTORE_GLOBUS_CLIENT_SECRET
environment variables. -
client_secret
(str | None
, default:None
) –Client secret.
Returns:
-
ConfidentialAppAuthClient
–Authorization client.
Raises:
-
ValueError
–if
client_id
orclient_secret
are not provided and one or both ofPROXYSTORE_GLOBUS_CLIENT_ID
andPROXYSTORE_GLOBUS_CLIENT_SECRET
are not set. -
ValueError
–if the provided
client_id
or 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",
) -> 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
¶
is_client_login() -> bool
Check if Globus client identity environment variables are set.
Based on the Globus Compute SDK's
is_client_login()
.
Returns:
-
bool
–True
ifPROXYSTORE_GLOBUS_CLIENT_ID
andPROXYSTORE_GLOBUS_CLIENT_SECRET
are set.