Skip to content

Commit

Permalink
GOCBC-304: Corrected certificate authenticator name.
Browse files Browse the repository at this point in the history
Motivation
----------
In order to maintain consistency between all SDKs, the name
of our certificate-based authenticator is intended to be
CertAuthenticator as opposed to the current name.

Changes
-------
Renamed CertificateAuthenticator to CertAuthenticator and added
a deprecated backwards-compatible alias from the old name to
the new name.

Change-Id: Ie8657b5e65a67248618b63c3a9068207ca56bfa7
Reviewed-on: http://review.couchbase.org/94436
Reviewed-by: Charles Dixon <chvckd@gmail.com>
Tested-by: Brett Lawson <brett19@gmail.com>
  • Loading branch information
brett19 committed Jun 5, 2018
1 parent 39dbd64 commit 9025e9c
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,18 @@ func (ra PasswordAuthenticator) Credentials(req AuthCredsRequest) ([]UserPassPai
}}, nil
}

// CertificateAuthenticator implements an Authenticator which can be used with certificate authentication.
type CertificateAuthenticator struct {
// CertAuthenticator implements an Authenticator which can be used with certificate authentication.
type CertAuthenticator struct {
}

// Credentials returns the credentials for a particular service.
func (ca CertificateAuthenticator) Credentials(req AuthCredsRequest) ([]UserPassPair, error) {
func (ca CertAuthenticator) Credentials(req AuthCredsRequest) ([]UserPassPair, error) {
return []UserPassPair{{
Username: "",
Password: "",
}}, nil
}

// CertificateAuthenticator is included for backwards compatibility only.
// Deprecated: Use CertAuthenticator instead.
type CertificateAuthenticator CertAuthenticator

0 comments on commit 9025e9c

Please sign in to comment.