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:28:50 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/trunk 6080d5590 -> bc1c1a62f


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/bc1c1a62
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/bc1c1a62
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/bc1c1a62

Branch: refs/heads/trunk
Commit: bc1c1a62fa4410b33f1f4225cb938ec2d3be495c
Parents: 6080d55
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:28:36 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/bc1c1a62/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