Created
October 17, 2017 23:52
-
-
Save jeffrymorris/89b7119f2049c4945ce663a850d7e37e to your computer and use it in GitHub Desktop.
[1:58 PM] Brett Lawson: Would you be able to show me what Java authentication looked like pre-cluster-level-auth, post-cluster-level-auth and post-rbac? [1:58 PM] Brett Lawson: .NET***
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//cluster-level authentication | |
var authenticator = new ClassicAuthenticator("Administrator", "password"); | |
authenticator.AddBucketCredential("authenticated", "secret"); | |
var cluster = new Cluster(); | |
cluster.Authenticate(authenticator); | |
var bucket = cluster.OpenBucket("authenticated"); | |
//RBAC authentication | |
var authenticator = new PasswordAuthenticator("Administrator", "password"); | |
var cluster = new Cluster(); | |
cluster.Authenticate(authenticator); | |
var bucket = cluster.OpenBucket("authenticated"); | |
//old-skool authentication | |
var cluster = new Cluster(); | |
var bucket = cluster.OpenBucket("authenticated", "secret"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment