directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject [07/19] directory-kerby git commit: More refactoring using SGT
Date Mon, 30 Nov 2015 03:09:48 GMT
More refactoring using SGT


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

Branch: refs/heads/pkinit-support
Commit: 1d41d3a23f77e336c6518df81965a26607efe853
Parents: 5372621
Author: Kai Zheng <kai.zheng@intel.com>
Authored: Sun Nov 29 07:48:29 2015 +0800
Committer: Kai Zheng <kai.zheng@intel.com>
Committed: Sun Nov 29 07:48:29 2015 +0800

----------------------------------------------------------------------
 .../kerb/client/impl/AbstractInternalKrbClient.java     | 12 ++++++------
 .../kerb/client/impl/DefaultInternalKrbClient.java      |  6 +++---
 .../kerby/kerberos/kerb/client/request/TgsRequest.java  |  2 +-
 3 files changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d41d3a2/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/AbstractInternalKrbClient.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/AbstractInternalKrbClient.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/AbstractInternalKrbClient.java
index 9555a8b..d27609b 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/AbstractInternalKrbClient.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/AbstractInternalKrbClient.java
@@ -110,7 +110,7 @@ public abstract class AbstractInternalKrbClient implements InternalKrbClient
{
 
         asRequest.setKrbOptions(requestOptions);
 
-        return doRequestTgtTicket(asRequest);
+        return doRequestTgt(asRequest);
     }
 
     /**
@@ -136,14 +136,14 @@ public abstract class AbstractInternalKrbClient implements InternalKrbClient
{
         tgsRequest.setServerPrincipal(new PrincipalName(serverPrincipal));
         tgsRequest.setKrbOptions(requestOptions);
 
-        return doRequestServiceTicket(tgsRequest);
+        return doRequestSgt(tgsRequest);
     }
 
-    protected abstract TgtTicket doRequestTgtTicket(
-            AsRequest tgtTktReq) throws KrbException;
+    protected abstract TgtTicket doRequestTgt(
+        AsRequest tgtTktReq) throws KrbException;
 
-    protected abstract SgtTicket doRequestServiceTicket(
-            TgsRequest tgsRequest) throws KrbException;
+    protected abstract SgtTicket doRequestSgt(
+        TgsRequest tgsRequest) throws KrbException;
 
     /**
      * Fix principal name.

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d41d3a2/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/DefaultInternalKrbClient.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/DefaultInternalKrbClient.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/DefaultInternalKrbClient.java
index b8a7775..26943c6 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/DefaultInternalKrbClient.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/impl/DefaultInternalKrbClient.java
@@ -68,7 +68,7 @@ public class DefaultInternalKrbClient extends AbstractInternalKrbClient
{
      * {@inheritDoc}
      */
     @Override
-    protected TgtTicket doRequestTgtTicket(AsRequest tgtTktReq) throws KrbException {
+    protected TgtTicket doRequestTgt(AsRequest tgtTktReq) throws KrbException {
         tgtTktReq.setSessionData(transport);
 
         krbHandler.handleRequest(tgtTktReq);
@@ -80,12 +80,12 @@ public class DefaultInternalKrbClient extends AbstractInternalKrbClient
{
      * {@inheritDoc}
      */
     @Override
-    protected SgtTicket doRequestServiceTicket(TgsRequest ticketReq) throws KrbException
{
+    protected SgtTicket doRequestSgt(TgsRequest ticketReq) throws KrbException {
         ticketReq.setSessionData(transport);
 
         krbHandler.handleRequest(ticketReq);
 
-        return ticketReq.getServiceTicket();
+        return ticketReq.getSgt();
     }
 
 }

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/1d41d3a2/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/TgsRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/TgsRequest.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/TgsRequest.java
index 5a813e9..e635a98 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/TgsRequest.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/request/TgsRequest.java
@@ -91,7 +91,7 @@ public class TgsRequest extends KdcRequest {
         }
     }
 
-    public SgtTicket getServiceTicket() {
+    public SgtTicket getSgt() {
         SgtTicket serviceTkt = new SgtTicket(getKdcRep().getTicket(),
                 (EncTgsRepPart) getKdcRep().getEncPart());
         return serviceTkt;


Mime
View raw message