:relfileprefix: ../../../ [#F1CB27D5058C90E9942219E2274454BB4459C06E] = Function url::remove_password pass:v,q[Remove the password] == Synopsis Declared in header `` [source,cpp,subs="verbatim,macros,-callouts"] ---- xref:boost/urls/url.adoc[url]& remove_password() noexcept; ---- == Description pass:v,q[This function removes the password from] pass:v,q[the userinfo if a password exists. If] pass:v,q[there is no userinfo or no authority,] pass:v,q[the call has no effect.] [NOTE] pass:v,q[The interpretation of the userinfo as] pass:v,q[individual user and password components] pass:v,q[is scheme-dependent. Transmitting] pass:v,q[passwords in URLs is deprecated.] === Example [,cpp] ---- assert( url( "http://user:pass@example.com" ).remove_password().authority().buffer() == "user@example.com" ); ---- === Postconditions [,cpp] ---- this->has_password() == false && this->encoded_password().empty() == true ---- === Complexity pass:v,q[Linear in `this->size()`.] === Exception Safety pass:v,q[Throws nothing.] === 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.2.1. User Information (rfc3986)] == Return Value * ``