directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject directory-kerby git commit: [DIRKRB-287]-Enable to create a KerberosTime object by passing a generalized time. Contributed by Yaning.
Date Mon, 15 Jun 2015 03:08:09 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/master 746e06f01 -> 5c51598ad


[DIRKRB-287]-Enable to create a KerberosTime object by passing a generalized time. Contributed
by Yaning.


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

Branch: refs/heads/master
Commit: 5c51598ad049383850ce12e10153cc98352743a7
Parents: 746e06f
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Mon Jun 15 11:13:21 2015 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Mon Jun 15 11:13:21 2015 +0800

----------------------------------------------------------------------
 .../identitybackend/LdapIdentityGetHelper.java  | 40 ++++++++++++++++++++
 1 file changed, 40 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/5c51598a/kerby-backend/ldap-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/LdapIdentityGetHelper.java
----------------------------------------------------------------------
diff --git a/kerby-backend/ldap-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/LdapIdentityGetHelper.java
b/kerby-backend/ldap-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/LdapIdentityGetHelper.java
new file mode 100644
index 0000000..39aedda
--- /dev/null
+++ b/kerby-backend/ldap-backend/src/main/java/org/apache/kerby/kerberos/kdc/identitybackend/LdapIdentityGetHelper.java
@@ -0,0 +1,40 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "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.
+ *
+ */
+package org.apache.kerby.kerberos.kdc.identitybackend;
+
+import org.apache.directory.api.ldap.model.entry.Entry;
+import org.apache.directory.api.util.GeneralizedTime;
+import org.apache.kerby.kerberos.kerb.spec.KerberosTime;
+
+import java.text.ParseException;
+
+public class LdapIdentityGetHelper {
+    private Entry entry;//NOPMD
+
+    public LdapIdentityGetHelper(Entry entry) {
+        this.entry = entry;
+    }
+
+    private KerberosTime createKerberosTime(String generalizedTime) throws ParseException
//NOPMD
+    {
+        long time = new GeneralizedTime(generalizedTime).getTime();
+        return new KerberosTime(time);
+    }
+}
\ No newline at end of file


Mime
View raw message