MCPcopy
hub / github.com/tsedio/tsed / Protocol

Function Protocol

packages/security/passport/src/decorators/protocol.ts:13–27  ·  view source on GitHub ↗
(options: ProtocolOptionsDecorator<T>)

Source from the content-addressed store, hash-verified

11 * @class
12 */
13export function Protocol<T = any>(options: ProtocolOptionsDecorator<T>) {
14 return useDecorators(
15 Injectable({
16 type: PROVIDER_TYPE_PROTOCOL
17 }),
18 StoreSet("protocol", options),
19 Configuration({
20 passport: {
21 protocols: {
22 [options.name]: options
23 }
24 }
25 })
26 );
27}
28
29export type ProtocolOptionsDecorator<T = any> = {name: string} & Partial<ProtocolOptions<T>>;

Callers 10

GraphQLProtocol.tsFile · 0.90
BasicProtocol.tsFile · 0.90
DiscordProtocol.tsFile · 0.90
JwtProtocol.tsFile · 0.90
LocalProtocolClass · 0.85

Calls 4

useDecoratorsFunction · 0.90
InjectableFunction · 0.90
StoreSetFunction · 0.90
ConfigurationFunction · 0.90

Tested by

no test coverage detected