directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject directory-kerby git commit: Renamed KrbOptions
Date Thu, 19 Mar 2015 00:51:38 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master 38cbe7896 -> 7d3de7b9e


Renamed KrbOptions


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/7d3de7b9
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/7d3de7b9
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/7d3de7b9

Branch: refs/heads/master
Commit: 7d3de7b9eeff07333cfd101710fb9352aa1c711f
Parents: 38cbe78
Author: Drankye <drankye@gmail.com>
Authored: Thu Mar 19 08:51:26 2015 +0800
Committer: Drankye <drankye@gmail.com>
Committed: Thu Mar 19 08:51:26 2015 +0800

----------------------------------------------------------------------
 .../apache/kerby/kerberos/tool/ToolUtil.java    |   7 +-
 .../apache/kerby/kerberos/tool/kinit/Kinit.java |   4 +-
 .../kerby/kerberos/kerb/client/KOptions.java    | 104 +++++++++++++++++++
 .../kerby/kerberos/kerb/client/KrbClient.java   |  33 +++---
 .../kerby/kerberos/kerb/client/KrbOptions.java  | 101 ------------------
 .../client/preauth/AbstractPreauthPlugin.java   |   4 +-
 .../kerb/client/preauth/KrbPreauth.java         |   4 +-
 .../kerb/client/preauth/PreauthHandle.java      |   4 +-
 .../kerb/client/preauth/PreauthHandler.java     |   4 +-
 .../client/preauth/pkinit/PkinitPreauth.java    |   4 +-
 .../kerb/client/preauth/token/TokenPreauth.java |   4 +-
 .../kerb/client/request/AsRequestWithCert.java  |   8 +-
 .../kerb/client/request/AsRequestWithToken.java |   8 +-
 .../kerb/client/request/KdcRequest.java         |  12 +--
 14 files changed, 151 insertions(+), 150 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kdc-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/ToolUtil.java
----------------------------------------------------------------------
diff --git a/kdc-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/ToolUtil.java
b/kdc-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/ToolUtil.java
index 3fb9d68..f70543e 100644
--- a/kdc-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/ToolUtil.java
+++ b/kdc-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/ToolUtil.java
@@ -22,8 +22,7 @@ package org.apache.kerby.kerberos.tool;
 import org.apache.kerby.kerberos.kerb.client.KOption;
 import org.apache.kerby.kerberos.kerb.client.KOptionType;
 import org.apache.kerby.kerberos.kerb.client.KrbOption;
-import org.apache.kerby.kerberos.kerb.client.KrbOptions;
-import org.apache.kerby.kerberos.tool.kinit.KinitOption;
+import org.apache.kerby.kerberos.kerb.client.KOptions;
 
 import java.io.File;
 
@@ -77,8 +76,8 @@ public class ToolUtil {
      * @param krbOptions
      * @return krb options
      */
-    public static KrbOptions convertOptions(KrbOptions krbOptions) {
-        KrbOptions results = new KrbOptions();
+    public static KOptions convertOptions(KOptions krbOptions) {
+        KOptions results = new KOptions();
 
         for (KOption toolOpt : krbOptions.getOptions()) {
             KrbOption krbOpt = KrbOption.fromOptionName(toolOpt.getOptionName());

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kdc-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/kinit/Kinit.java
----------------------------------------------------------------------
diff --git a/kdc-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/kinit/Kinit.java
b/kdc-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/kinit/Kinit.java
index 8e3678f..a0fc597 100644
--- a/kdc-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/kinit/Kinit.java
+++ b/kdc-tool/client-tool/src/main/java/org/apache/kerby/kerberos/tool/kinit/Kinit.java
@@ -94,7 +94,7 @@ public class Kinit {
         return password;
     }
 
-    private static int requestTicket(String principal, KrbOptions kinitOptions) {
+    private static int requestTicket(String principal, KOptions kinitOptions) {
         KrbClient krbClient = new KrbClient();
         krbClient.init();
 
@@ -112,7 +112,7 @@ public class Kinit {
     }
 
     public static void main(String[] args) throws Exception {
-        KrbOptions ktOptions = new KrbOptions();
+        KOptions ktOptions = new KOptions();
         KinitOption kto;
         String principal = null;
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KOptions.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KOptions.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KOptions.java
new file mode 100644
index 0000000..c196065
--- /dev/null
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KOptions.java
@@ -0,0 +1,104 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *  
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *  
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License. 
+ *  
+ */
+package org.apache.kerby.kerberos.kerb.client;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * A KOption container.
+ */
+public class KOptions {
+
+    private final Map<KOption, KOption> options =
+            new HashMap<KOption, KOption>();
+
+    public void add(KOption option) {
+        if (option != null) {
+            options.put(option, option);
+        }
+    }
+
+    public void add(KOption option, Object optionValue) {
+        if (option != null) {
+            option.setValue(optionValue);
+            add(option);
+        }
+    }
+
+    public boolean contains(KOption option) {
+        return options.containsKey(option);
+    }
+
+    public List<KOption> getOptions() {
+        return new ArrayList<>(options.keySet());
+    }
+
+    public KOption getOption(KOption option) {
+        if (! options.containsKey(option)) {
+            return null;
+        }
+
+        return options.get(option);
+    }
+
+    public Object getOptionValue(KOption option) {
+        if (! contains(option)) {
+            return null;
+        }
+        return options.get(option).getValue();
+    }
+
+    public String getStringOption(KOption option) {
+        Object value = getOptionValue(option);
+        if (value instanceof String) {
+            return (String) value;
+        }
+        return null;
+    }
+
+    public boolean getBooleanOption(KOption option) {
+        Object value = getOptionValue(option);
+        if (value instanceof String) {
+            String strVal = (String) value;
+            if (strVal.equalsIgnoreCase("true") ||
+                strVal.equalsIgnoreCase("yes") ||
+                strVal.equals("1")) {
+                return true;
+            }
+        } else if (value instanceof Boolean) {
+            return (Boolean) value;
+        }
+        return false;
+    }
+
+    public int getIntegerOption(KOption option) {
+        Object value = getOptionValue(option);
+        if (value instanceof String) {
+            String strVal = (String) value;
+            return Integer.valueOf(strVal);
+        } else if (value instanceof Integer) {
+            return (Integer) value;
+        }
+        return -1;
+    }
+}

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClient.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClient.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClient.java
index fd4109d..da80391 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClient.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbClient.java
@@ -19,7 +19,6 @@
  */
 package org.apache.kerby.kerberos.kerb.client;
 
-import org.apache.kerby.config.Conf;
 import org.apache.kerby.event.Event;
 import org.apache.kerby.event.EventHub;
 import org.apache.kerby.event.EventWaiter;
@@ -232,9 +231,9 @@ public class KrbClient {
      * @throws KrbException
      */
     public TgtTicket requestTgtTicket(String principal,
-                                      KrbOptions options) throws KrbException {
+                                      KOptions options) throws KrbException {
         if (options == null) {
-            options = new KrbOptions();
+            options = new KOptions();
         }
 
         AsRequest asRequest = new AsRequest(context);
@@ -251,9 +250,9 @@ public class KrbClient {
      * @throws KrbException
      */
     public TgtTicket requestTgtTicket(String principal, String password,
-                                      KrbOptions options) throws KrbException {
+                                      KOptions options) throws KrbException {
         if (options == null) {
-            options = new KrbOptions();
+            options = new KOptions();
         }
 
         AsRequest asRequest = new AsRequestWithPasswd(context);
@@ -273,9 +272,9 @@ public class KrbClient {
      */
     public TgtTicket requestTgtTicket(
             String principal, Certificate certificate, PrivateKey privateKey,
-            KrbOptions options) throws KrbException {
+            KOptions options) throws KrbException {
         if (options == null) {
-            options = new KrbOptions();
+            options = new KOptions();
         }
 
         AsRequestWithCert asRequest = new AsRequestWithCert(context);
@@ -291,9 +290,9 @@ public class KrbClient {
      * @return
      * @throws KrbException
      */
-    public TgtTicket requestTgtTicket(KrbOptions options) throws KrbException {
+    public TgtTicket requestTgtTicket(KOptions options) throws KrbException {
         if (options == null) {
-            options = new KrbOptions();
+            options = new KOptions();
         }
 
         AsRequestWithCert asRequest = new AsRequestWithCert(context);
@@ -313,9 +312,9 @@ public class KrbClient {
      * @throws KrbException
      */
     public TgtTicket requestTgtTicket(String principal, KerbToken token,
-                                      KrbOptions options) throws KrbException {
+                                      KOptions options) throws KrbException {
         if (options == null) {
-            options = new KrbOptions();
+            options = new KOptions();
         }
 
         AsRequestWithToken asRequest = new AsRequestWithToken(context);
@@ -335,9 +334,9 @@ public class KrbClient {
      */
     public ServiceTicket requestServiceTicket(
             String clientPrincipal, String password, String serverPrincipal,
-            KrbOptions options) throws KrbException {
+            KOptions options) throws KrbException {
         if (options == null) {
-            options = new KrbOptions();
+            options = new KOptions();
         }
 
         TgtTicket tgt = requestTgtTicket(clientPrincipal, password, options);
@@ -355,9 +354,9 @@ public class KrbClient {
      */
     public ServiceTicket requestServiceTicket(
             String clientPrincipal, KerbToken token, String serverPrincipal,
-            KrbOptions options) throws KrbException {
+            KOptions options) throws KrbException {
         if (options == null) {
-            options = new KrbOptions();
+            options = new KOptions();
         }
 
         TgtTicket tgt = requestTgtTicket(clientPrincipal, token, options);
@@ -408,9 +407,9 @@ public class KrbClient {
      * @throws KrbException
      */
     public ServiceTicket requestServiceTicket(TgtTicket tgt, String serverPrincipal,
-                                              KrbOptions options) throws KrbException {
+                                              KOptions options) throws KrbException {
         if (options == null) {
-            options = new KrbOptions();
+            options = new KOptions();
         }
 
         TgsRequest ticketReq = new TgsRequest(context, tgt);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbOptions.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbOptions.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbOptions.java
deleted file mode 100644
index 1670673..0000000
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/KrbOptions.java
+++ /dev/null
@@ -1,101 +0,0 @@
-/**
- *  Licensed to the Apache Software Foundation (ASF) under one
- *  or more contributor license agreements.  See the NOTICE file
- *  distributed with this work for additional information
- *  regarding copyright ownership.  The ASF licenses this file
- *  to you under the Apache License, Version 2.0 (the
- *  "License"); you may not use this file except in compliance
- *  with the License.  You may obtain a copy of the License at
- *  
- *    http://www.apache.org/licenses/LICENSE-2.0
- *  
- *  Unless required by applicable law or agreed to in writing,
- *  software distributed under the License is distributed on an
- *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- *  KIND, either express or implied.  See the License for the
- *  specific language governing permissions and limitations
- *  under the License. 
- *  
- */
-package org.apache.kerby.kerberos.kerb.client;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-public class KrbOptions {
-
-    private final Map<KOption, KOption> options =
-            new HashMap<KOption, KOption>();
-
-    public void add(KOption option) {
-        if (option != null) {
-            options.put(option, option);
-        }
-    }
-
-    public void add(KOption option, Object optionValue) {
-        if (option != null) {
-            option.setValue(optionValue);
-            add(option);
-        }
-    }
-
-    public boolean contains(KOption option) {
-        return options.containsKey(option);
-    }
-
-    public List<KOption> getOptions() {
-        return new ArrayList<>(options.keySet());
-    }
-
-    public KOption getOption(KOption option) {
-        if (! options.containsKey(option)) {
-            return null;
-        }
-
-        return options.get(option);
-    }
-
-    public Object getOptionValue(KOption option) {
-        if (! contains(option)) {
-            return null;
-        }
-        return options.get(option).getValue();
-    }
-
-    public String getStringOption(KOption option) {
-        Object value = getOptionValue(option);
-        if (value instanceof String) {
-            return (String) value;
-        }
-        return null;
-    }
-
-    public boolean getBooleanOption(KOption option) {
-        Object value = getOptionValue(option);
-        if (value instanceof String) {
-            String strVal = (String) value;
-            if (strVal.equalsIgnoreCase("true") ||
-                strVal.equalsIgnoreCase("yes") ||
-                strVal.equals("1")) {
-                return true;
-            }
-        } else if (value instanceof Boolean) {
-            return (Boolean) value;
-        }
-        return false;
-    }
-
-    public int getIntegerOption(KOption option) {
-        Object value = getOptionValue(option);
-        if (value instanceof String) {
-            String strVal = (String) value;
-            return Integer.valueOf(strVal);
-        } else if (value instanceof Integer) {
-            return (Integer) value;
-        }
-        return -1;
-    }
-}

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/AbstractPreauthPlugin.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/AbstractPreauthPlugin.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/AbstractPreauthPlugin.java
index 09f5c58..4fad98b 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/AbstractPreauthPlugin.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/AbstractPreauthPlugin.java
@@ -20,7 +20,7 @@
 package org.apache.kerby.kerberos.kerb.client.preauth;
 
 import org.apache.kerby.kerberos.kerb.client.KrbContext;
-import org.apache.kerby.kerberos.kerb.client.KrbOptions;
+import org.apache.kerby.kerberos.kerb.client.KOptions;
 import org.apache.kerby.kerberos.kerb.client.request.KdcRequest;
 import org.apache.kerby.kerberos.kerb.preauth.PaFlag;
 import org.apache.kerby.kerberos.kerb.preauth.PaFlags;
@@ -81,7 +81,7 @@ public class AbstractPreauthPlugin implements KrbPreauth {
 
     @Override
     public void setPreauthOptions(KdcRequest kdcRequest,
-                                  PluginRequestContext requestContext, KrbOptions options)
{
+                                  PluginRequestContext requestContext, KOptions options)
{
 
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/KrbPreauth.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/KrbPreauth.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/KrbPreauth.java
index 2797ca4..1d98785 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/KrbPreauth.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/KrbPreauth.java
@@ -20,7 +20,7 @@
 package org.apache.kerby.kerberos.kerb.client.preauth;
 
 import org.apache.kerby.kerberos.kerb.client.KrbContext;
-import org.apache.kerby.kerberos.kerb.client.KrbOptions;
+import org.apache.kerby.kerberos.kerb.client.KOptions;
 import org.apache.kerby.kerberos.kerb.client.request.KdcRequest;
 import org.apache.kerby.kerberos.kerb.preauth.PaFlags;
 import org.apache.kerby.kerberos.kerb.preauth.PluginRequestContext;
@@ -65,7 +65,7 @@ public interface KrbPreauth extends PreauthPluginMeta {
      */
     public void setPreauthOptions(KdcRequest kdcRequest,
                                   PluginRequestContext requestContext,
-                                  KrbOptions preauthOptions);
+                                  KOptions preauthOptions);
 
     /**
      * Attempt to try any initial padata derived from user options

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandle.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandle.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandle.java
index 2491fac..6813ee6 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandle.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandle.java
@@ -19,7 +19,7 @@
  */
 package org.apache.kerby.kerberos.kerb.client.preauth;
 
-import org.apache.kerby.kerberos.kerb.client.KrbOptions;
+import org.apache.kerby.kerberos.kerb.client.KOptions;
 import org.apache.kerby.kerberos.kerb.client.request.KdcRequest;
 import org.apache.kerby.kerberos.kerb.preauth.PaFlags;
 import org.apache.kerby.kerberos.kerb.preauth.PluginRequestContext;
@@ -46,7 +46,7 @@ public class PreauthHandle {
     }
 
     public void setPreauthOptions(KdcRequest kdcRequest,
-                                  KrbOptions preauthOptions) throws KrbException {
+                                  KOptions preauthOptions) throws KrbException {
         preauth.setPreauthOptions(kdcRequest, requestContext, preauthOptions);
     }
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandler.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandler.java
index 319179e..d2b8ce1 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandler.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/PreauthHandler.java
@@ -20,7 +20,7 @@
 package org.apache.kerby.kerberos.kerb.client.preauth;
 
 import org.apache.kerby.kerberos.kerb.client.KrbContext;
-import org.apache.kerby.kerberos.kerb.client.KrbOptions;
+import org.apache.kerby.kerberos.kerb.client.KOptions;
 import org.apache.kerby.kerberos.kerb.client.preauth.builtin.EncTsPreauth;
 import org.apache.kerby.kerberos.kerb.client.preauth.builtin.TgtPreauth;
 import org.apache.kerby.kerberos.kerb.client.preauth.pkinit.PkinitPreauth;
@@ -129,7 +129,7 @@ public class PreauthHandler {
     }
 
     public void setPreauthOptions(KdcRequest kdcRequest,
-                                  KrbOptions preauthOptions) throws KrbException {
+                                  KOptions preauthOptions) throws KrbException {
         PreauthContext preauthContext = kdcRequest.getPreauthContext();
 
         for (PreauthHandle handle : preauthContext.getHandles()) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/pkinit/PkinitPreauth.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/pkinit/PkinitPreauth.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/pkinit/PkinitPreauth.java
index d5a516c..edac8a6 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/pkinit/PkinitPreauth.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/pkinit/PkinitPreauth.java
@@ -21,7 +21,7 @@ package org.apache.kerby.kerberos.kerb.client.preauth.pkinit;
 
 import org.apache.kerby.kerberos.kerb.client.KrbContext;
 import org.apache.kerby.kerberos.kerb.client.KrbOption;
-import org.apache.kerby.kerberos.kerb.client.KrbOptions;
+import org.apache.kerby.kerberos.kerb.client.KOptions;
 import org.apache.kerby.kerberos.kerb.client.preauth.AbstractPreauthPlugin;
 import org.apache.kerby.kerberos.kerb.preauth.PluginRequestContext;
 import org.apache.kerby.kerberos.kerb.client.request.KdcRequest;
@@ -66,7 +66,7 @@ public class PkinitPreauth extends AbstractPreauthPlugin {
     @Override
     public void setPreauthOptions(KdcRequest kdcRequest,
                                   PluginRequestContext requestContext,
-                                  KrbOptions options) {
+                                  KOptions options) {
         if (options.contains(KrbOption.PKINIT_X509_IDENTITY)) {
             pkinitContext.identityOpts.identity =
                     options.getStringOption(KrbOption.PKINIT_X509_IDENTITY);

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/token/TokenPreauth.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/token/TokenPreauth.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/token/TokenPreauth.java
index b912311..69cef3f 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/token/TokenPreauth.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/preauth/token/TokenPreauth.java
@@ -21,7 +21,7 @@ package org.apache.kerby.kerberos.kerb.client.preauth.token;
 
 import org.apache.kerby.kerberos.kerb.client.KrbContext;
 import org.apache.kerby.kerberos.kerb.client.KrbOption;
-import org.apache.kerby.kerberos.kerb.client.KrbOptions;
+import org.apache.kerby.kerberos.kerb.client.KOptions;
 import org.apache.kerby.kerberos.kerb.client.preauth.AbstractPreauthPlugin;
 import org.apache.kerby.kerberos.kerb.preauth.PluginRequestContext;
 import org.apache.kerby.kerberos.kerb.client.request.KdcRequest;
@@ -73,7 +73,7 @@ public class TokenPreauth extends AbstractPreauthPlugin {
     @Override
     public void setPreauthOptions(KdcRequest kdcRequest,
                                   PluginRequestContext requestContext,
-                                  KrbOptions options) {
+                                  KOptions options) {
 
         tokenContext.usingIdToken = options.getBooleanOption(KrbOption.TOKEN_USING_IDTOKEN);
         if (tokenContext.usingIdToken) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithCert.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithCert.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithCert.java
index 43b2368..9b3d8fb 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithCert.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithCert.java
@@ -21,7 +21,7 @@ package org.apache.kerby.kerberos.kerb.client.request;
 
 import org.apache.kerby.kerberos.kerb.client.KrbContext;
 import org.apache.kerby.kerberos.kerb.client.KrbOption;
-import org.apache.kerby.kerberos.kerb.client.KrbOptions;
+import org.apache.kerby.kerberos.kerb.client.KOptions;
 import org.apache.kerby.kerberos.kerb.KrbException;
 import org.apache.kerby.kerberos.kerb.spec.pa.PaDataType;
 
@@ -41,10 +41,10 @@ public class AsRequestWithCert extends AsRequest {
     }
 
     @Override
-    public KrbOptions getPreauthOptions() {
-        KrbOptions results = new KrbOptions();
+    public KOptions getPreauthOptions() {
+        KOptions results = new KOptions();
 
-        KrbOptions krbOptions = getKrbOptions();
+        KOptions krbOptions = getKrbOptions();
         results.add(krbOptions.getOption(KrbOption.PKINIT_X509_CERTIFICATE));
         results.add(krbOptions.getOption(KrbOption.PKINIT_X509_ANCHORS));
         results.add(krbOptions.getOption(KrbOption.PKINIT_X509_PRIVATE_KEY));

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithToken.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithToken.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithToken.java
index 586c9ed..de5f0f2 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithToken.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/AsRequestWithToken.java
@@ -21,7 +21,7 @@ package org.apache.kerby.kerberos.kerb.client.request;
 
 import org.apache.kerby.kerberos.kerb.client.KrbContext;
 import org.apache.kerby.kerberos.kerb.client.KrbOption;
-import org.apache.kerby.kerberos.kerb.client.KrbOptions;
+import org.apache.kerby.kerberos.kerb.client.KOptions;
 import org.apache.kerby.kerberos.kerb.KrbException;
 import org.apache.kerby.kerberos.kerb.spec.pa.PaDataType;
 
@@ -39,10 +39,10 @@ public class AsRequestWithToken extends AsRequest {
     }
 
     @Override
-    public KrbOptions getPreauthOptions() {
-        KrbOptions results = new KrbOptions();
+    public KOptions getPreauthOptions() {
+        KOptions results = new KOptions();
 
-        KrbOptions krbOptions = getKrbOptions();
+        KOptions krbOptions = getKrbOptions();
         results.add(krbOptions.getOption(KrbOption.TOKEN_USING_IDTOKEN));
         results.add(krbOptions.getOption(KrbOption.TOKEN_USER_ID_TOKEN));
         results.add(krbOptions.getOption(KrbOption.TOKEN_USER_AC_TOKEN));

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7d3de7b9/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
index bbbadab..f065550 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/KdcRequest.java
@@ -20,7 +20,7 @@
 package org.apache.kerby.kerberos.kerb.client.request;
 
 import org.apache.kerby.kerberos.kerb.client.KrbContext;
-import org.apache.kerby.kerberos.kerb.client.KrbOptions;
+import org.apache.kerby.kerberos.kerb.client.KOptions;
 import org.apache.kerby.kerberos.kerb.client.preauth.FastContext;
 import org.apache.kerby.kerberos.kerb.client.preauth.PreauthContext;
 import org.apache.kerby.kerberos.kerb.client.preauth.PreauthHandler;
@@ -49,7 +49,7 @@ public abstract class KdcRequest {
     private KrbContext context;
     private Transport transport;
 
-    private KrbOptions krbOptions;
+    private KOptions krbOptions;
     private PrincipalName serverPrincipal;
     private List<HostAddress> hostAddresses = new ArrayList<HostAddress>();
     private KdcOptions kdcOptions = new KdcOptions();
@@ -83,11 +83,11 @@ public abstract class KdcRequest {
         return this.transport;
     }
 
-    public void setKrbOptions(KrbOptions options) {
+    public void setKrbOptions(KOptions options) {
         this.krbOptions = options;
     }
 
-    public KrbOptions getKrbOptions() {
+    public KOptions getKrbOptions() {
         return krbOptions;
     }
 
@@ -270,8 +270,8 @@ public abstract class KdcRequest {
 
     public abstract void processResponse(KdcRep kdcRep) throws KrbException;
 
-    public KrbOptions getPreauthOptions() {
-        return new KrbOptions();
+    public KOptions getPreauthOptions() {
+        return new KOptions();
     }
 
     protected void preauth() throws KrbException {


Mime
View raw message