directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dran...@apache.org
Subject [41/44] directory-kerby git commit: No need to check the request type to set the token
Date Thu, 30 Jun 2016 08:54:28 GMT
No need to check the request type to set the token


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

Branch: refs/heads/gssapi
Commit: 79d4a584129026bcf920dd1ae5c28c27c6971412
Parents: f39f005
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri Jun 17 12:44:05 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri Jun 17 12:44:05 2016 +0100

----------------------------------------------------------------------
 .../kerberos/kerb/server/preauth/token/TokenPreauth.java  | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/79d4a584/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/preauth/token/TokenPreauth.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/preauth/token/TokenPreauth.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/preauth/token/TokenPreauth.java
index 5abca91..81ce5dd 100644
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/preauth/token/TokenPreauth.java
+++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/preauth/token/TokenPreauth.java
@@ -30,9 +30,7 @@ import org.apache.kerby.kerberos.kerb.preauth.PluginRequestContext;
 import org.apache.kerby.kerberos.kerb.preauth.token.TokenPreauthMeta;
 import org.apache.kerby.kerberos.kerb.provider.TokenDecoder;
 import org.apache.kerby.kerberos.kerb.server.preauth.AbstractPreauthPlugin;
-import org.apache.kerby.kerberos.kerb.server.request.AsRequest;
 import org.apache.kerby.kerberos.kerb.server.request.KdcRequest;
-import org.apache.kerby.kerberos.kerb.server.request.TgsRequest;
 import org.apache.kerby.kerberos.kerb.type.base.AuthToken;
 import org.apache.kerby.kerberos.kerb.type.base.EncryptedData;
 import org.apache.kerby.kerberos.kerb.type.base.EncryptionKey;
@@ -108,13 +106,7 @@ public class TokenPreauth extends AbstractPreauthPlugin {
             if (!audiences.contains(serverPrincipal.getName())) {
                 throw new KrbException("The token audience does not match with the target
server principal!");
             }
-            if (kdcRequest instanceof AsRequest) {
-                AsRequest asRequest = (AsRequest) kdcRequest;
-                asRequest.setToken(authToken);
-            } else if (kdcRequest instanceof TgsRequest) {
-                TgsRequest tgsRequest = (TgsRequest) kdcRequest;
-                tgsRequest.setToken(authToken);
-            }
+            kdcRequest.setToken(authToken);
             return true;
         } else {
             return false;


Mime
View raw message