UNPKG

oidc-provider

Version:

OAuth 2.0 Authorization Server implementation for Node.js with OpenID Connect

18 lines (16 loc) 337 B
export function isHttpsUri(uri) { try { const { protocol } = new URL(uri); return protocol === 'https:'; } catch (err) { return false; } } export function isWebUri(uri) { try { const { protocol } = new URL(uri); return protocol === 'https:' || protocol === 'http:'; } catch (err) { return false; } }