urlObject.auth


auth 属性是网址的用户名和密码部分,也称为 userinfo。 此字符串子集跟在 protocol 和双斜杠(如果存在)之后,并在 host 组件之前,由 @ 分隔。 该字符串要么是用户名,要么是由 : 分隔的用户名和密码。

例如:'user:pass'

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 :.

For example: 'user:pass'.