directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject directory-kerby git commit: Minor change to token login module
Date Tue, 08 Aug 2017 11:29:06 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/1.0.x-fixes 1facf515d -> 7e2d8e7f8


Minor change to token login module


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

Branch: refs/heads/1.0.x-fixes
Commit: 7e2d8e7f88e0cc0c2099ebd3afcd395549e99de3
Parents: 1facf51
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Tue Aug 8 12:28:36 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue Aug 8 12:29:02 2017 +0100

----------------------------------------------------------------------
 .../kerby/kerberos/kerb/client/jaas/TokenAuthLoginModule.java    | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/7e2d8e7f/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/jaas/TokenAuthLoginModule.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/jaas/TokenAuthLoginModule.java
b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/jaas/TokenAuthLoginModule.java
index d883334..bb98a46 100644
--- a/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/jaas/TokenAuthLoginModule.java
+++ b/kerby-kerb/kerb-client/src/main/java/org/apache/kerby/kerberos/kerb/client/jaas/TokenAuthLoginModule.java
@@ -269,13 +269,11 @@ public class TokenAuthLoginModule implements LoginModule {
                 } catch (IOException e) {
                     LOG.error("Token decode failed. " + e.toString());
                 }
-                krbToken = new KrbToken(authToken, TokenFormat.JWT);
                 TokenEncoder tokenEncoder = KrbRuntime.getTokenProvider().createTokenEncoder();
 
                 if (tokenEncoder instanceof JwtTokenEncoder) {
                     PrivateKey signKey = null;
-                    try {
-                        InputStream is = Files.newInputStream(signKeyFile.toPath());
+                    try (InputStream is = Files.newInputStream(signKeyFile.toPath())) {
                         signKey = PrivateKeyReader.loadPrivateKey(is);
                     } catch (IOException e) {
                         LOG.error("Failed to load private key from file: "


Mime
View raw message