(
tag: Context.Key<Id, any> & { readonly security: Security },
key: Key,
credential: Effect.Effect<
UnionToIntersection<HttpApiSecurity.HttpApiSecurity.Type<Security[Key]>>,
Id[typeof TypeId]["clientError"],
R
>
)
| 688 | * @since 4.1.8 |
| 689 | */ |
| 690 | export const layerClientSecurity = < |
| 691 | Id extends AnyId, |
| 692 | Security extends Record<string, HttpApiSecurity.HttpApiSecurity>, |
| 693 | const Key extends keyof Security & string, |
| 694 | R |
| 695 | >( |
| 696 | tag: Context.Key<Id, any> & { readonly security: Security }, |
| 697 | key: Key, |
| 698 | credential: Effect.Effect< |
| 699 | UnionToIntersection<HttpApiSecurity.HttpApiSecurity.Type<Security[Key]>>, |
| 700 | Id[typeof TypeId]["clientError"], |
| 701 | R |
| 702 | > |
| 703 | ): Layer.Layer<ForClient<Id>, never, R> => { |
| 704 | const security = tag.security[key] |
| 705 | return layerClient( |
| 706 | tag, |
| 707 | ({ next, request }) => Effect.flatMap(credential, (value) => next(securityEncode(request, security, value))) |
| 708 | ) |
| 709 | } |
nothing calls this directly
no test coverage detected