ACCESS_POLICY_COMPLETED¶
Description¶
This event is triggered when the access policy execution completes for
a user session. This event is a notification to admin that the access
policy has completed for the user. Admin can use this event to do post
access policy related work. For e.g. reading and setting some session
variables. Admin can use ACCESS::policy and ACCESS::session commands
to check the result of the policy and to get and set session variables
in this event , in addition to TCP/SSL/HTTP iRule commands in this
event.
Examples¶
# Override the default 302 redirect at the end of the Access Policy and set an extra cookie
# based on an APM session variable
when ACCESS_POLICY_COMPLETED {
set myclientip [ACCESS::session data get "session.user.clientip"]
set mylandinguri [ACCESS::session data get "session.server.landinguri"]
ACCESS::respond 302 "Location" "$mylandinguri" "Connection" "Close" "Set-Cookie" "myclientip=$myclientip"
}