workbench.oauth.integrations

workbench.oauth.integrations

OAuth integration resources.

Classes

Name Description
Integration OAuth integration resource.
Integrations OAuth integrations resource collection.

Integration

workbench.oauth.integrations.Integration(ctx, **attributes)

OAuth integration resource.

Represents a single OAuth integration configured in Workbench.

Attributes

Name Type Description
guid str The unique identifier (GUID) of the integration.
name str The internal name of the integration.
display_name str The user-facing display name of the integration.
type str The OAuth provider type (e.g., “github”, “azure”, “custom”, etc.).
client_id str The OAuth client ID for this integration.
auth_url str The authorization URL for the OAuth provider.
token_url str The token exchange URL for the OAuth provider.
scopes list[str] The OAuth scopes requested by this integration.
issuer str The issuer URL for the OAuth provider.
authenticated bool Whether the current user is authenticated with this integration.

Integrations

workbench.oauth.integrations.Integrations(ctx)

OAuth integrations resource collection.

Methods

Name Description
find Find all OAuth integrations.
find_by Find an OAuth integration by various criteria.
get Get an OAuth integration by GUID.
find
workbench.oauth.integrations.Integrations.find()

Find all OAuth integrations.

Returns
Name Type Description
list[Integration] A list of all OAuth integrations configured in Workbench.
Raises
Name Type Description
RuntimeError If the backend returns an error response.
find_by
workbench.oauth.integrations.Integrations.find_by(
    name=None,
    display_name=None,
    guid=None,
    authenticated=None,
)

Find an OAuth integration by various criteria.

Parameters
Name Type Description Default
name Optional[str] A regex pattern to match the integration name. For exact matches, use ^ and $. For example, ^github-main$ will match only “github-main”. None
display_name Optional[str] A regex pattern to match the integration display name. For exact matches, use ^ and $. For example, ^GitHub$ will match only “GitHub”. None
guid Optional[str] The unique identifier (GUID) of the integration. None
authenticated Optional[bool] Whether the user is authenticated with this integration. None
Returns
Name Type Description
Integration | None The first matching integration, or None if no match is found.
get
workbench.oauth.integrations.Integrations.get(guid)

Get an OAuth integration by GUID.

This is a convenience method that calls find_by(guid=guid).

Parameters
Name Type Description Default
guid str The unique identifier (GUID) of the integration to retrieve. Must be a non-empty string. required
Returns
Name Type Description
Integration | None The integration if found, otherwise None.
Raises
Name Type Description
ValueError If guid is empty or not a string.