api.utils

Functions

authenticate(→ None)

check_rate_limit(→ dict[str, str])

Checks if the rate limit for the current client.

Module Contents

api.utils.authenticate(request: onegov.core.request.CoreRequest) None[source]
api.utils.check_rate_limit(request: onegov.core.request.CoreRequest) dict[str, str][source]

Checks if the rate limit for the current client.

Raises an exception if the rate limit is reached. Returns response headers containing informations about the remaining rate limit.

Logged in users don’t have rate limits. The same is true for users that have authenticated with a token.