Skip to content

Commit 86f62a6

Browse files
committed
docs: adds and updates some docs comments
1 parent 83e0ce5 commit 86f62a6

File tree

5 files changed

+198
-72
lines changed

5 files changed

+198
-72
lines changed

lib/src/access.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,12 @@ export async function noteInvalidPublicKey(url: URL, r: Promise<CryptoKey>): Pro
136136
}
137137
}
138138

139+
/**
140+
* Fetches the key access servers for a given platform URL.
141+
* @param platformUrl The platform URL to fetch key access servers for.
142+
* @param authProvider The authentication provider to use for the request.
143+
* @returns A promise that resolves to an OriginAllowList.
144+
*/
139145
export async function fetchKeyAccessServers(
140146
platformUrl: string,
141147
authProvider: AuthProvider
@@ -190,6 +196,15 @@ const origin = (u: string): string => {
190196
}
191197
};
192198

199+
/**
200+
* Manages a list of origins that are allowed to access the Key Access Server (KAS).
201+
* @origins A list of origins that are allowed to access the KAS.
202+
* @allowAll If true, all origins are allowed to access the KAS.
203+
* If false, only the origins in the list are allowed to access the KAS.
204+
* @description This class is used to manage a list of origins that are allowed to access the KAS.
205+
* It validates the URLs and provides a method to check if a given URL is allowed.
206+
* It is used to ensure that only authorized origins can access the KAS.
207+
*/
193208
export class OriginAllowList {
194209
origins: string[];
195210
allowAll: boolean;

0 commit comments

Comments
 (0)