Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterEndpoints ¶
func RegisterEndpoints(s store.Store, permissionsManager permissions.Manager, revocationGuard RevocationGuard, router *mux.Router)
RegisterEndpoints registers the proxy token endpoints. revocationGuard is optional; pass nil for no revocation policy.
Types ¶
type RevocationGuard ¶
type RevocationGuard interface {
CheckProxyAccessTokenRevocation(ctx context.Context, token *types.ProxyAccessToken) error
}
RevocationGuard vetoes the tenant-facing revocation of a proxy access token. Implementations are supplied by integrations; none is installed by default, so every token the caller's account owns may be revoked. It is consulted after the ownership check and before the token is revoked. A returned status error is written with util.WriteError: its type selects the HTTP status and its message is shown to the caller, so it must not carry internal detail. Any other error is reported as a generic internal error.
Click to show internal directories.
Click to hide internal directories.