Example #1
0
        public override async Task AuthenticateAsync(IConnection connection, CancellationToken cancellationToken = default)
        {
            using var op = new SaslStart
                  {
                      Key        = MechanismType.GetDescription(),
                      Content    = GetAuthData(_username, _password),
                      Opaque     = SequenceGenerator.GetNext(),
                      Transcoder = new LegacyTranscoder()
                  };

            await SendAsync(op, connection, cancellationToken);
        }
Example #2
0
        public override async Task AuthenticateAsync(IConnection connection, CancellationToken cancellationToken = default)
        {
            using var rootSpan = Tracer.RootSpan(CouchbaseTags.Service, OperationNames.AuthenticatePlain);
            using var op       = new SaslStart
                  {
                      Key        = MechanismType.GetDescription(),
                      Content    = GetAuthData(_username, _password),
                      Opaque     = SequenceGenerator.GetNext(),
                      Transcoder = new LegacyTranscoder(),
                      Span       = rootSpan,
                  };

            await SendAsync(op, connection, cancellationToken).ConfigureAwait(false);
        }