Files
authentik/website/docs/customize/policies/expression/managing_flow_context_keys.md
Simonyi Gergő ff504a3b80 stages/redirect: create redirect stage (#12275)
* create redirect stage

* show "keep context" toggle in Flow mode only

* fix typos

* add docs

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>

* simplify property pass

* simplify toggle

* remove `print` statements

whoops

* fix typo

* remove default from `RedirectStage.mode`

* remove migration

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* oops

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

* adjust docs

Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>

---------

Signed-off-by: Jens Langhammer <jens@goauthentik.io>
Co-authored-by: Tana M Berry <tanamarieberry@yahoo.com>
Co-authored-by: Jens Langhammer <jens@goauthentik.io>
2024-12-12 18:00:09 +01:00

526 B

title
title
Managing flow context keys

Flow context can be managed in Expression policies via the context['flow_plan'].context variable.

Here's an example of setting a key in an Expression policy:

context['flow_plan'].context['redirect_stage_target'] = 'ak-flow://redirected-authentication-flow'

And here's an example of removing that key:

context['flow_plan'].context.pop('redirect_stage_target', None)