cold-scientist-93808
08/21/2024, 2:41 PMchilly-king-10285
08/21/2024, 2:41 PMchilly-king-10285
08/21/2024, 2:41 PMAuthenticationSession
value: go type AuthenticationSession struct { Subject string Extra map[string]interface{} Header http.Header MatchContext MatchContext } type MatchContext struct { RegexpCaptureGroups []string URL *url.URL Method string Header http.Header }
In this structure, Subject
is a string that represents the subject of the session. Extra
is a map that can contain any additional data related to the session. Header
is an HTTP header associated with the session. MatchContext
is another struct that contains information about the match context, including regular expression capture groups, the URL, the method, and the HTTP header. You can find more details about this in the [Ory documentation](https://www.ory.sh/docs/oathkeeper/pipeline#session).cold-scientist-93808
08/21/2024, 2:42 PMchilly-king-10285
08/21/2024, 2:42 PMchilly-king-10285
08/21/2024, 2:42 PMremote_json
authorizer payload, which are derived from the `AuthenticationSession`: json { "subject": "{{ print .Subject }}", "resource": "{{ printIndex .MatchContext.RegexpCaptureGroups 0 }}" }
In this JSON payload, {{ print .Subject }}
is a placeholder for the Subject
field of the AuthenticationSession
, and {{ printIndex .MatchContext.RegexpCaptureGroups 0 }}
is a placeholder for the first element of the RegexpCaptureGroups
field of the MatchContext
within the AuthenticationSession
. You can find more details about this in the [Ory documentation](https://www.ory.sh/docs/oathkeeper/pipeline/authz#remote_json-configuration).