| 52 | ) |
| 53 | |
| 54 | export class RequestContextMap extends RpcContextMap.makeMap({ |
| 55 | allowAnonymous: RpcContextMap.makeInverted<UserProfile>()(NotLoggedInError), |
| 56 | requireRoles: RpcContextMap.makeCustom()(UnauthorizedError, Array<string>()), |
| 57 | test: RpcContextMap.make()(S.Never) |
| 58 | }) {} |
| 59 | |
| 60 | export class AllowAnonymous extends RpcX.RpcMiddleware.Tag<AllowAnonymous, { requires: SomeElse }>()("AllowAnonymous", { |
| 61 | dynamic: RequestContextMap.get("allowAnonymous") |