• Validates that a well-known URL is properly formatted.

    Checks that the URL:

    1. Is a valid URL
    2. Uses HTTPS (or HTTP for localhost development)
    3. Ends with /.well-known/openid-configuration (per OpenID Connect Discovery 1.0)

    Parameters

    • wellknownUrl: string

      The URL to validate

    Returns boolean

    True if the URL is valid, secure, and has the correct path suffix

    isValidWellknownUrl('https://am.example.com/.well-known/openid-configuration')
    // Returns: true

    isValidWellknownUrl('http://localhost:8080/.well-known/openid-configuration')
    // Returns: true (localhost allows HTTP)

    isValidWellknownUrl('https://am.example.com/am/oauth2/alpha')
    // Returns: false (missing /.well-known/openid-configuration path)

    isValidWellknownUrl('not-a-url')
    // Returns: false