CredentialTransport
object CredentialTransport
Refuses to send credentials (API keys, bearer tokens) over cleartext HTTP.
Functions
Link copied to clipboard
Throws IllegalArgumentException when baseUrl is http:// and hasCredentials is true and the host is not a loopback address. https:// is always accepted, and so is http:// when no credentials are configured (the caller then has nothing to leak). The host is judged by its literal form (localhost, 127.0.0.0/8, ::1) and never resolved, so a hostname that merely resolves to a local address does not qualify.