awx_plugins.credentials.github_app module¶
GitHub App Installation Access Token Credential Plugin.
This module defines a credential plugin for making use of the GitHub Apps mechanism, allowing authentication via GitHub App installation-scoped access tokens.
Functions:
extract_github_app_install_token(): Generates a GitHub App Installation token.github_app_lookup: Defines the credential plugin interface.
- class awx_plugins.credentials.github_app.EmptyKwargs¶
Bases:
TypedDictSchema for zero keyword arguments.
- class awx_plugins.credentials.github_app.GitHubAppInputs¶
Bases:
TypedDictSchema for a collection of plugin input fields.
-
metadata:
list[MetadataDict]¶
-
metadata:
- awx_plugins.credentials.github_app.extract_github_app_install_token(*, github_api_url: str, app_or_client_id: int | str, private_rsa_key: str, install_id: int | str, **_discarded_kwargs: Unpack[EmptyKwargs]) str¶
Generate a GH App Installation access token.
- Parameters:
github_api_url (
str) – The GitHub instance API endpoint URL.app_or_client_id (
int|str) – The GitHub App ID or Client ID.private_rsa_key (
str) – The private key associated with the GitHub App._discarded_kwargs (
Unpack[EmptyKwargs]) – Aren’t expected to be passed.
- Return type:
- Returns:
A GitHub access token for a GitHub App Installation.
- Raises:
ValueError – If authentication fails or parameters are invalid.
RuntimeError – If an unexpected error occurs during token generation.