[#boost-urls-authority_view-encoded_password]
= xref:boost.adoc[boost]::xref:boost/urls.adoc[urls]::xref:boost/urls/authority_view.adoc[authority&lowbar;view]::encoded&lowbar;password
:relfileprefix: ../../../
:mrdocs:


Return the password

== Synopsis


Declared in `&lt;https://www.github.com/boostorg/url/blob/develop/include/boost/url/authority_view.hpp#L627[boost&sol;url&sol;authority&lowbar;view&period;hpp]&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:boost/urls/pct_string_view.adoc[pct&lowbar;string&lowbar;view]
encoded&lowbar;password() const noexcept;
----

== Description


This function returns the password portion        of the userinfo as a percent&hyphen;encoded string&period;


=== Example

[,cpp]
----
assert( url_view( "http://jane%2Ddoe:pass@example.com" ).encoded_password() == "pass" );
----

=== Complexity

Constant&period;


=== Exception Safety

Throws nothing&period;


=== BNF

[,cpp]
----
userinfo    = user [ ":" [ password ] ]

user        = *( unreserved / pct-encoded / sub-delims )
password    = *( unreserved / pct-encoded / sub-delims / ":" )
----

=== Specification

* link:https://datatracker.ietf.org/doc/html/rfc3986#section-3.2.1[3&period;2&period;1&period; User Information (rfc3986)]



== See Also


xref:boost/urls/authority_view/has_password.adoc[has&lowbar;password],            xref:boost/urls/authority_view/has_userinfo.adoc[has&lowbar;userinfo],            xref:boost/urls/authority_view/encoded_user.adoc[encoded&lowbar;user],            xref:boost/urls/authority_view/encoded_userinfo.adoc[encoded&lowbar;userinfo],            xref:boost/urls/authority_view/password.adoc[password],            xref:boost/urls/authority_view/user.adoc[user],            xref:boost/urls/authority_view/userinfo.adoc[userinfo]&period;






[.small]#Created with https://www.mrdocs.com[MrDocs]#
