You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/09/08 21:14:31 UTC
[43/50] incubator-tinkerpop git commit: Update javadoc.
Update javadoc.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/27322aba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/27322aba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/27322aba
Branch: refs/heads/TINKERPOP3-333
Commit: 27322aba7d78f76547a42c740b2c75f931183d0c
Parents: 847642e
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Fri Sep 4 10:14:45 2015 -0400
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Fri Sep 4 10:14:45 2015 -0400
----------------------------------------------------------------------
.../gremlin/driver/AuthProperties.java | 34 ++++++++++++++++++--
.../tinkerpop/gremlin/driver/Handler.java | 2 +-
2 files changed, 32 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/27322aba/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/AuthProperties.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/AuthProperties.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/AuthProperties.java
index 3fd464a..2c1b4d4 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/AuthProperties.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/AuthProperties.java
@@ -21,22 +21,50 @@ package org.apache.tinkerpop.gremlin.driver;
import java.util.HashMap;
import java.util.Map;
+/**
+ * Properties to supply to the {@link Cluster} for authentication purposes.
+ */
public class AuthProperties {
+
+ /**
+ * An enum of the available authorization properties.
+ */
public enum Property {
+ /**
+ * The username.
+ */
USERNAME,
+
+ /**
+ * The password.
+ */
PASSWORD,
+
+ /**
+ * The protocol for which the authentication is being performed (e.g., "ldap").
+ */
PROTOCOL,
+
+ /**
+ * The name used as the index into the configuration for the {@code LoginContext}.
+ */
JAAS_ENTRY
}
- private Map<Property, String> properties = new HashMap<>();
+ private final Map<Property, String> properties = new HashMap<>();
- public AuthProperties with(Property key, String value) {
+ /**
+ * Adds a {@link Property} with value to the authorization property set.
+ */
+ public AuthProperties with(final Property key, final String value) {
properties.put(key, value);
return this;
}
- public String get(Property key) {
+ /**
+ * Gets a property given the key.
+ */
+ public String get(final Property key) {
return properties.get(key);
}
}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/27322aba/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java
----------------------------------------------------------------------
diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java
index 73df542..8871f13 100644
--- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java
+++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Handler.java
@@ -129,7 +129,7 @@ final class Handler {
private Subject login() throws LoginException {
// Login if the user provided us with an entry into the JAAS config file
if (authProps.get(AuthProperties.Property.JAAS_ENTRY) != null) {
- LoginContext login = new LoginContext(authProps.get(AuthProperties.Property.JAAS_ENTRY));
+ final LoginContext login = new LoginContext(authProps.get(AuthProperties.Property.JAAS_ENTRY));
login.login();
return login.getSubject();
}