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: Decode the KrbToken properly
Date Mon, 03 Jul 2017 09:56:48 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/trunk 6d0369932 -> 70fbd4b64


Decode the KrbToken properly


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

Branch: refs/heads/trunk
Commit: 70fbd4b64fcf1fea8cc894f011f5c785cc6c7bc5
Parents: 6d03699
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Jul 3 10:56:33 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Jul 3 10:56:33 2017 +0100

----------------------------------------------------------------------
 .../apache/kerby/kerberos/kerb/type/base/KrbToken.java | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/70fbd4b6/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/base/KrbToken.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/base/KrbToken.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/base/KrbToken.java
index 68d3a3b..beb5ffb 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/base/KrbToken.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/type/base/KrbToken.java
@@ -14,15 +14,17 @@
  *  "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. 
+ *  under the License.
  *
  */
 package org.apache.kerby.kerberos.kerb.type.base;
 
+import java.io.IOException;
 import java.util.Date;
 import java.util.List;
 import java.util.Map;
 
+import org.apache.kerby.asn1.parse.Asn1ParseResult;
 import org.apache.kerby.kerberos.kerb.KrbConstant;
 import org.apache.kerby.kerberos.kerb.KrbException;
 import org.apache.kerby.kerberos.kerb.KrbRuntime;
@@ -87,6 +89,15 @@ public class KrbToken extends KrbTokenBase implements AuthToken {
         setTokenType();
     }*/
 
+    @Override
+    public void decode(Asn1ParseResult parseResult) throws IOException {
+        super.decode(parseResult);
+        if (getTokenValue() != null) {
+            this.innerToken = getTokenDecoder().decodeFromBytes(getTokenValue());
+            setTokenType();
+        }
+    }
+
     /**
      * Set token type.
      */


Mime
View raw message