In general authentication settings you can configure a session hook workflow id. This workflow will be executed whenever a session is updated. The workflow gets a SimpleValueRequest as input that contains 5 parameters.
- type: This is a string that has a value "login" if the session is updated and a value "logout" if the session is removed.
- response_headers: contains the response headers.
- credential: contains the session.
- request_headers: contains the request headers.
- request_cookies: contains the request cookies.
The response from the session hook workflow is expected to be a map of headers. These headers will be added to the response headers.