4141#include < bdlbb_blob.h>
4242#include < bsl_iostream.h>
4343#include < bsl_string.h>
44+ #include < bsl_string_view.h>
4445#include < bsl_vector.h>
4546#include < bslma_managedptr.h>
4647#include < bslma_usesbslmaallocator.h>
4748#include < bslmf_nestedtraitdeclaration.h>
48- #include < bslstl_stringref.h>
4949
5050namespace BloombergLP {
5151namespace mqbplug {
@@ -64,15 +64,15 @@ class AuthenticationData BSLS_KEYWORD_FINAL {
6464 public:
6565 // CREATORS
6666 AuthenticationData (const bsl::vector<char >& authnPayload,
67- bslstl::StringRef clientIpAddress);
67+ bsl::string_view clientIpAddress);
6868
6969 // ACESSORS
7070
7171 // / Return the authentication material provided by the client.
7272 const bsl::vector<char >& authnPayload () const ;
7373
7474 // / Return the IP Address of the client.
75- bslstl::StringRef clientIpAddress () const ;
75+ bsl::string_view clientIpAddress () const ;
7676};
7777
7878// ==========================
@@ -88,7 +88,7 @@ class AuthenticationResult {
8888 // ACCESSORS
8989
9090 // / Return the principal.
91- virtual bslstl::StringRef principal () const = 0;
91+ virtual bsl::string_view principal () const = 0;
9292
9393 // / Return the remaining lifetime of an authenticated session.
9494 virtual const bsl::optional<bsls::Types::Int64>& lifetimeMs () const = 0;
@@ -109,12 +109,12 @@ class Authenticator {
109109 // ACESSORS
110110
111111 // / Return the name of the plugin.
112- virtual bslstl::StringRef name () const = 0;
112+ virtual bsl::string_view name () const = 0;
113113
114114 // / Return the authentication mechanism supported by this Authenticator.
115115 // / Guaranteed to return a valid mechanism once the Authenticator is
116116 // / constructed.
117- virtual bslstl::StringRef mechanism () const = 0;
117+ virtual bsl::string_view mechanism () const = 0;
118118
119119 // / Authenticate using the data provided in the specified `input`.
120120 // / - Return `0` on success, and populate the specified `result` with
@@ -167,7 +167,7 @@ struct AuthenticatorUtil {
167167
168168 // / Find authenticator config with the specified `name`
169169 static const mqbcfg::AuthenticatorPluginConfig*
170- findAuthenticatorConfig (bslstl::StringRef name);
170+ findAuthenticatorConfig (bsl::string_view name);
171171};
172172
173173// ============================================================================
@@ -180,7 +180,7 @@ struct AuthenticatorUtil {
180180
181181inline AuthenticationData::AuthenticationData (
182182 const bsl::vector<char >& authnPayload,
183- bslstl::StringRef clientIpAddress)
183+ bsl::string_view clientIpAddress)
184184: d_authnPayload(authnPayload)
185185, d_clientIpAddress(clientIpAddress)
186186{
@@ -191,7 +191,7 @@ inline const bsl::vector<char>& AuthenticationData::authnPayload() const
191191 return d_authnPayload;
192192}
193193
194- inline bslstl::StringRef AuthenticationData::clientIpAddress () const
194+ inline bsl::string_view AuthenticationData::clientIpAddress () const
195195{
196196 return d_clientIpAddress;
197197}
0 commit comments