Recorder returns an Authorizer that records any authorization checks made on the Context provided for the authorization check. Requires using the RecordAuthzChecks middleware.
(authz Authorizer)
| 832 | // |
| 833 | // Requires using the RecordAuthzChecks middleware. |
| 834 | func Recorder(authz Authorizer) Authorizer { |
| 835 | return &authRecorder{authz: authz} |
| 836 | } |
| 837 | |
| 838 | func (c *authRecorder) Authorize(ctx context.Context, subject Subject, action policy.Action, object Object) error { |
| 839 | err := c.authz.Authorize(ctx, subject, action, object) |