Skip to content

Commit

Permalink
GOCBC-198: Updated old RbacAuthenticator to new PasswordAuthenticator…
Browse files Browse the repository at this point in the history
… name.

Change-Id: I461a48a14242c8349af032e81a0f7a0f7a9f9676
Reviewed-on: http://review.couchbase.org/78073
Reviewed-by: Mark Nunberg <mark.nunberg@couchbase.com>
Tested-by: Brett Lawson <brett19@gmail.com>
  • Loading branch information
brett19 committed May 12, 2017
1 parent 818028e commit 4448769
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,51 +86,51 @@ func (ca ClusterAuthenticator) bucketFts(bucket string) []userPassPair {
}
}

// RbacAuthenticator implements an Authenticator which uses an RBAC username and password.
type RbacAuthenticator struct {
// PasswordAuthenticator implements an Authenticator which uses an RBAC username and password.
type PasswordAuthenticator struct {
Username string
Password string
}

func (ra RbacAuthenticator) rbacAll() userPassPair {
func (ra PasswordAuthenticator) rbacAll() userPassPair {
return userPassPair{ra.Username, ra.Password}
}

func (ra RbacAuthenticator) clusterMgmt() userPassPair {
func (ra PasswordAuthenticator) clusterMgmt() userPassPair {
return ra.rbacAll()
}

func (ra RbacAuthenticator) clusterN1ql() []userPassPair {
func (ra PasswordAuthenticator) clusterN1ql() []userPassPair {
return []userPassPair{
ra.rbacAll(),
}
}

func (ra RbacAuthenticator) clusterFts() []userPassPair {
func (ra PasswordAuthenticator) clusterFts() []userPassPair {
return []userPassPair{
ra.rbacAll(),
}
}

func (ra RbacAuthenticator) bucketMemd(bucket string) userPassPair {
func (ra PasswordAuthenticator) bucketMemd(bucket string) userPassPair {
return ra.rbacAll()
}

func (ra RbacAuthenticator) bucketMgmt(bucket string) userPassPair {
func (ra PasswordAuthenticator) bucketMgmt(bucket string) userPassPair {
return ra.rbacAll()
}

func (ra RbacAuthenticator) bucketViews(bucket string) userPassPair {
func (ra PasswordAuthenticator) bucketViews(bucket string) userPassPair {
return ra.rbacAll()
}

func (ra RbacAuthenticator) bucketN1ql(bucket string) []userPassPair {
func (ra PasswordAuthenticator) bucketN1ql(bucket string) []userPassPair {
return []userPassPair{
ra.rbacAll(),
}
}

func (ra RbacAuthenticator) bucketFts(bucket string) []userPassPair {
func (ra PasswordAuthenticator) bucketFts(bucket string) []userPassPair {
return []userPassPair{
ra.rbacAll(),
}
Expand Down

0 comments on commit 4448769

Please sign in to comment.