runway.cfngin.hooks.staticsite.auth_at_edge.client_updater module

User Pool Client Updater.

Responsible for updating the User Pool Client with the generated distribution url + callback url paths.

pydantic model runway.cfngin.hooks.staticsite.auth_at_edge.client_updater.HookArgs[source]

Bases: HookArgsBaseModel

Hook arguments.

Show JSON schema
{
   "title": "HookArgs",
   "description": "Hook arguments.",
   "type": "object",
   "properties": {
      "tags": {
         "additionalProperties": {
            "type": "string"
         },
         "default": {},
         "title": "Tags",
         "type": "object"
      },
      "alternate_domains": {
         "items": {
            "type": "string"
         },
         "title": "Alternate Domains",
         "type": "array"
      },
      "client_id": {
         "title": "Client Id",
         "type": "string"
      },
      "distribution_domain": {
         "title": "Distribution Domain",
         "type": "string"
      },
      "oauth_scopes": {
         "items": {
            "type": "string"
         },
         "title": "Oauth Scopes",
         "type": "array"
      },
      "redirect_path_sign_in": {
         "title": "Redirect Path Sign In",
         "type": "string"
      },
      "redirect_path_sign_out": {
         "title": "Redirect Path Sign Out",
         "type": "string"
      },
      "supported_identity_providers": {
         "default": [],
         "items": {
            "type": "string"
         },
         "title": "Supported Identity Providers",
         "type": "array"
      }
   },
   "required": [
      "alternate_domains",
      "client_id",
      "distribution_domain",
      "oauth_scopes",
      "redirect_path_sign_in",
      "redirect_path_sign_out"
   ]
}

field alternate_domains: list[str] = PydanticUndefined

A list of any alternate domains that need to be listed with the primary distribution domain.

field client_id: str = PydanticUndefined

Client ID.

field distribution_domain: str = PydanticUndefined

Distribution domain.

field oauth_scopes: list[str] = PydanticUndefined

A list of all available validation scopes for oauth.

field redirect_path_sign_in: str = PydanticUndefined

The redirect path after sign in.

field redirect_path_sign_out: str = PydanticUndefined

The redirect path after sign out.

field supported_identity_providers: list[str] = []

Supported identity providers.

runway.cfngin.hooks.staticsite.auth_at_edge.client_updater.get_redirect_uris(domains: list[str], redirect_path_sign_in: str, redirect_path_sign_out: str) dict[str, list[str]][source]

Create dict of redirect URIs for AppClient.

runway.cfngin.hooks.staticsite.auth_at_edge.client_updater.update(context: runway.context.CfnginContext, *_args: Any, **kwargs: Any) bool[source]

Update the callback urls for the User Pool Client.

Required to match the redirect_uri being sent which contains our distribution and alternate domain names.

Arguments parsed by HookArgs.

Parameters:
  • context – The context instance.

  • **kwargs – Arbitrary keyword arguments.