urlObject.auth


auth 属性是 URL 中的用户名和密码部分,也称为 userinfo。这个字符串子集位于 protocol 和双斜杠(如果存在)之后,并在 host 组件之前,用 @ 分隔。这个字符串要么只是用户名,要么是用户名和密码,用 : 分隔。

【The auth property is the username and password portion of the URL, also referred to as userinfo. This string subset follows the protocol and double slashes (if present) and precedes the host component, delimited by @. The string is either the username, or it is the username and password separated by :.】

例如:'user:pass'

【For example: 'user:pass'.】