MCPcopy Create free account
hub / github.com/adcontextprotocol/adcp / normalizeScope

Method normalizeScope

server/src/validator.ts:667–681  ·  view source on GitHub ↗
(scope?: AuthorizationScope)

Source from the content-addressed store, hash-verified

665 }
666
667 private normalizeScope(scope?: AuthorizationScope): NormalizedScope {
668 if (!scope) {
669 return {};
670 }
671
672 return {
673 property_id: scope.property_id,
674 property_tags: scope.property_tags ? [...new Set(scope.property_tags)] : undefined,
675 collection_ids: scope.collection_ids ? [...new Set(scope.collection_ids)] : undefined,
676 placement_ids: scope.placement_ids ? [...new Set(scope.placement_ids)] : undefined,
677 placement_tags: scope.placement_tags ? [...new Set(scope.placement_tags)] : undefined,
678 country: scope.country?.toUpperCase(),
679 at: scope.at,
680 };
681 }
682
683 private hasIntersection(left: string[], right: string[]): boolean {
684 const rightSet = new Set(right);

Callers 1

validateMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected