852
throw new Error('Authorization server metadata must have an issuer');
853
}
855
>
for (const uri of urisToCheck) {
856
>
if (!metadata[uri]) {
857
continue;
858
}
859
>
if (typeof metadata[uri] !== 'string') {
oauth.ts
860
throw new Error(`Authorization server metadata '${uri}' must be a string`);
861
}
862
>
if (!metadata[uri].startsWith('https://') && !metadata[uri].startsWith('http://')) {
oauth.ts
863
throw new Error(`Authorization server metadata '${uri}' must start with http:// or https://`);
864
}
866
>
return true;
867
>
}
868
869
export function isAuthorizationDynamicClientRegistrationResponse(obj: unknown): obj is IAuthorizationDynamicClientRegistrationResponse {