@oada/lookup
Version:
JavaScript utility library to lookup OADA documents such as Well-Known (RFC 5785) resource, e.g., oada-configuration, openid-configuration, etc, and public OADA client registrations
46 lines (45 loc) • 1.42 kB
TypeScript
/**
* @license
* Copyright 2014-2022 Open Ag Data Alliance
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
export declare function wellKnown(hostname: string, suffix: string, { timeout }?: {
timeout?: number | undefined;
}): Promise<unknown>;
export interface JWK {
kty: string;
}
export interface ClientRegistration {
clientId: string;
redirectURLs: string[];
licenses: Array<{
id: string;
name: string;
}>;
keys: JWK[];
name: string;
contact: string;
puc: string;
}
export declare function clientRegistration(clientId: string, { timeout }?: {
timeout?: number | undefined;
}): Promise<ClientRegistration>;
export declare function jwks(uri: string, { timeout }?: {
timeout?: number | undefined;
}): Promise<{
keys: JWK[];
}>;
export declare function trustedCDP({ timeout }?: {
timeout?: number | undefined;
}): Promise<string[]>;