Skip to main content

prefect.server.models.csrf_token

Functions

create_or_update_csrf_token

Create or update a CSRF token for a client. If the client already has a token, it will be updated. Args:
  • session: The database session
  • client: The client identifier
Returns:
  • core.CsrfToken: The CSRF token

read_token_for_client

Read a CSRF token for a client. Args:
  • session: The database session
  • client: The client identifier
Returns:
  • Optional[core.CsrfToken]: The CSRF token, if it exists and is not expired.

delete_expired_tokens

Delete expired CSRF tokens. Args:
  • session: The database session
Returns:
  • The number of tokens deleted