AuthorizationStrategy is an interface that implements a function which checkers whether the current certification target request can be fulfilled using the supplied context (e.g., based on the authenticated user).
| 53 | // checkers whether the current certification target request can be fulfilled using the |
| 54 | // supplied context (e.g., based on the authenticated user). |
| 55 | type AuthorizationStrategy interface { |
| 56 | CheckAccess(ctx context.Context, typ RequestType, req api.CertificationTargetRequest) bool |
| 57 | AllowedCertificationTargets(ctx context.Context) (all bool, IDs []string) |
| 58 | } |
| 59 | |
| 60 | // AuthorizationStrategyJWT is an AuthorizationStrategy that expects a list of certification target IDs to be in a specific JWT |
| 61 | // claim key. |
no outgoing calls
no test coverage detected