runway.hooks.staticsite.auth_at_edge.domain_updater module

User Pool Client Domain Updater.

runway.hooks.staticsite.auth_at_edge.domain_updater.update(context, provider, **kwargs)[source]

Retrieve/Update the domain name of the specified client.

A domain name is required in order to make authorization and token requests. This prehook ensures we have one available, and if not we create one based on the user pool and client ids.

Keyword Arguments
  • user_pool_id (str) – The ID of the Cognito User Pool.

  • client_id (str) – The ID of the Cognito User Pool Client.

runway.hooks.staticsite.auth_at_edge.domain_updater.delete(context, provider, **kwargs)[source]

Delete the domain if the user pool was created by Runway.

If a User Pool was created by Runway, and populated with a domain, that domain must be deleted prior to the User Pool itself being deleted or an error will occur. This process ensures that our generated domain name is deleted, or skips if not able to find one.

Keyword Arguments

client_id (str) – The ID of the Cognito User Pool Client.

runway.hooks.staticsite.auth_at_edge.domain_updater.get_user_pool_domain(prefix, region)[source]

Return a user pool domain name based on the prefix received and region.

  • prefix (str) – The domain prefix for the domain.

  • region (str) – The region in which the pool resides.