ds_provider_aic_py_lib.linked_service

File: __init__.py Region: ds_provider_aic_py_lib.linked_service

AIC identity linked service.

Example

>>> linked_service = AICIdentityLinkedService(
...     id=uuid.uuid4(),
...     name="aic-identity",
...     version="1.0.0",
...     settings=AICIdentityLinkedServiceSettings(
...         auth_type=AuthType.BEARER,
...         bearer=AICIdentityBearerAuthSettings(
...             username="user@example.com",
...             password="pass",
...         ),
...     ),
... )
>>> linked_service.connect()

Submodules

Classes

AICIdentityBearerAuthSettings

Username and password settings for the AIC identity server.

AICIdentityLinkedService

Linked service for the AIC identity server.

AICIdentityLinkedServiceSettings

Settings required to connect to the AIC identity server.

AICIdentityOAuth2AuthSettings

OAuth2 client-credentials settings for the AIC identity server.

Package Contents

class ds_provider_aic_py_lib.linked_service.AICIdentityBearerAuthSettings[source]

Bases: ds_protocol_http_py_lib.linked_service.http.BearerAuthSettings

Username and password settings for the AIC identity server.

username is the account email. The HTTP protocol posts it to token_endpoint and stores the returned bearer token.

token_endpoint

The URL to obtain the bearer token.

token_endpoint: str = 'https://auth.grasp-daas.com/auth/login/'

//auth.grasp-daas.com/auth/login/’

Type:

The URL to obtain the bearer token. Default is ‘https

class ds_provider_aic_py_lib.linked_service.AICIdentityLinkedService[source]

Bases: ds_protocol_http_py_lib.linked_service.http.HttpLinkedService[AICIdentityLinkedServiceSettingsType], Generic[AICIdentityLinkedServiceSettingsType]

Linked service for the AIC identity server.

settings: AICIdentityLinkedServiceSettingsType
property type: ds_provider_aic_py_lib.enums.ResourceType

The type of the linked service.

Returns:

The type of the linked service.

Return type:

ResourceType

class ds_provider_aic_py_lib.linked_service.AICIdentityLinkedServiceSettings[source]

Bases: ds_protocol_http_py_lib.linked_service.http.HttpLinkedServiceSettings

Settings required to connect to the AIC identity server.

host

AIC identity host.

auth_type

Bearer (username/password) or OAuth2 (client credentials).

schema

The schema to use for the connection (e.g., “https”).

oauth2

OAuth2 authentication settings (if auth_type is OAUTH2).

bearer

Username and password settings (if auth_type is BEARER).

host: str = 'auth.grasp-daas.com'

AIC identity host. Default is ‘auth.grasp-daas.com’.

auth_type: ds_protocol_http_py_lib.enums.AuthType

The type of authentication to use. Default is BEARER.

schema: str = 'https'

The schema to use for the connection. Default is ‘https’.

oauth2: AICIdentityOAuth2AuthSettings | None = None

OAuth2 authentication settings (if auth_type is OAUTH2).

bearer: AICIdentityBearerAuthSettings | None = None

Username and password settings (if auth_type is BEARER).

class ds_provider_aic_py_lib.linked_service.AICIdentityOAuth2AuthSettings[source]

Bases: ds_protocol_http_py_lib.linked_service.http.OAuth2AuthSettings

OAuth2 client-credentials settings for the AIC identity server.

token_endpoint

The URL to obtain the OAuth2 token.

scope

Scopes sent on the token request.

token_endpoint: str = 'https://auth.grasp-daas.com/oauth/token/'

//auth.grasp-daas.com/oauth/token/’

Type:

The URL to obtain the OAuth2 token. Default is ‘https

scope: str | None = 'openid read'

OAuth2 scope. Default is ‘openid read’.