:relfileprefix: ../../../ [#boost-urls-authority_view-userinfo] == xref:boost.adoc[pass:[boost]]::xref:boost/urls.adoc[pass:[urls]]::xref:boost/urls/authority_view.adoc[pass:[authority_view]]::userinfo Return the userinfo === Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- template StringToken::result_type userinfo(StringToken&& token) const; ---- === Description If present, this function returns a string representing the userinfo (which may be empty). Otherwise it returns an empty string. Any percent-escapes in the string are decoded first. [,cpp] ---- assert( url_view( "http://jane%2Ddoe:pass@example.com" ).userinfo() == "jane-doe:pass" ); ---- === Linear in `this->userinfo().size()`. === Calls to allocate may throw. [,cpp] ---- userinfo = user [ ":" [ password ] ] authority = [ userinfo "@" ] host [ ":" port ] ---- * link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.1[3.2.1. User Information (rfc3986)] === See Also xref:boost/urls/authority_view/has_password.adoc[has_password] , xref:boost/urls/authority_view/has_userinfo.adoc[has_userinfo] , xref:boost/urls/authority_view/encoded_password.adoc[encoded_password] , xref:boost/urls/authority_view/encoded_user.adoc[encoded_user] , xref:boost/urls/authority_view/encoded_userinfo.adoc[encoded_userinfo] , xref:boost/urls/authority_view/password.adoc[password] , xref:boost/urls/authority_view/user.adoc[user] .