diff --git a/website/docs/policies/expression.mdx b/website/docs/policies/expression.mdx index 2200cc96f..aaf850608 100644 --- a/website/docs/policies/expression.mdx +++ b/website/docs/policies/expression.mdx @@ -54,6 +54,11 @@ import Objects from "../expressions/_objects.md"; - `request.context`: A dictionary with dynamic data. This depends on the origin of the execution. - `geoip`: GeoIP object, see [GeoIP](https://geoip2.readthedocs.io/en/latest/#geoip2.models.City) + + ```python + return context["geoip"].country.iso_code == "US" + ``` + - `ak_is_sso_flow`: Boolean which is true if request was initiated by authenticating through an external provider. - `ak_client_ip`: Client's IP Address or 255.255.255.255 if no IP Address could be extracted. Can be [compared](#comparing-ip-addresses), for example