workbench.oauth.integrations
workbench.oauth.integrations
OAuth integration resources.
Classes
Integration
workbench.oauth.integrations.Integration(ctx, **attributes)
OAuth integration resource.
Represents a single OAuth integration configured in Workbench.
Attributes
| 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
| 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
|
list[Integration] |
A list of all OAuth integrations configured in Workbench. |
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 |
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
|
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
| guid |
str |
The unique identifier (GUID) of the integration to retrieve. Must be a non-empty string. |
required |
Returns
|
Integration | None |
The integration if found, otherwise None. |