summaryrefslogtreecommitdiffstats
path: root/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java
diff options
context:
space:
mode:
authorEndi Sukma Dewata <edewata@redhat.com>2012-03-24 02:27:47 -0500
committerEndi Sukma Dewata <edewata@redhat.com>2012-03-26 11:43:54 -0500
commit621d9e5c413e561293d7484b93882d985b3fe15f (patch)
tree638f3d75761c121d9a8fb50b52a12a6686c5ac5c /base/common/src/com/netscape/certsrv/authentication/IAuthToken.java
parent40d3643b8d91886bf210aa27f711731c81a11e49 (diff)
downloadpki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.gz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.tar.xz
pki-621d9e5c413e561293d7484b93882d985b3fe15f.zip
Removed unnecessary pki folder.
Previously the source code was located inside a pki folder. This folder was created during svn migration and is no longer needed. This folder has now been removed and the contents have been moved up one level. Ticket #131
Diffstat (limited to 'base/common/src/com/netscape/certsrv/authentication/IAuthToken.java')
-rw-r--r--base/common/src/com/netscape/certsrv/authentication/IAuthToken.java225
1 files changed, 225 insertions, 0 deletions
diff --git a/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java b/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java
new file mode 100644
index 000000000..f46ee3ca1
--- /dev/null
+++ b/base/common/src/com/netscape/certsrv/authentication/IAuthToken.java
@@ -0,0 +1,225 @@
+// --- BEGIN COPYRIGHT BLOCK ---
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; version 2 of the License.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License along
+// with this program; if not, write to the Free Software Foundation, Inc.,
+// 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+//
+// (C) 2007 Red Hat, Inc.
+// All rights reserved.
+// --- END COPYRIGHT BLOCK ---
+package com.netscape.certsrv.authentication;
+
+import java.math.BigInteger;
+import java.util.Date;
+import java.util.Enumeration;
+
+import netscape.security.x509.CertificateExtensions;
+import netscape.security.x509.X509CertImpl;
+
+import com.netscape.certsrv.base.EBaseException;
+import com.netscape.certsrv.usrgrp.Certificates;
+
+/**
+ * AuthToken interface.
+ */
+public interface IAuthToken {
+
+ /**
+ * Constant for userid.
+ */
+ public static final String USER_ID = "userid";
+
+ /**
+ * Sets an attribute value within this AttrSet.
+ *
+ * @param name the name of the attribute
+ * @param value the attribute object.
+ * @return false on an error
+ */
+ public boolean set(String name, String value);
+
+ /**
+ * Gets an attribute value.
+ *
+ * @param name the name of the attribute to return.
+ * @exception EBaseException on attribute handling errors.
+ * @return the attribute value
+ */
+ public String getInString(String name);
+
+ /**
+ * Returns an enumeration of the names of the attributes existing within
+ * this AttrSet.
+ *
+ * @return an enumeration of the attribute names.
+ */
+ public Enumeration<String> getElements();
+
+ /************
+ * Helpers for non-string sets and gets.
+ * These are needed because AuthToken is stored in IRequest (which can
+ * only store string values
+ */
+
+ /**
+ * Retrieves the byte array value for name. The value should have been
+ * previously stored as a byte array (it will be CMS.AtoB decoded).
+ *
+ * @param name The attribute name.
+ * @return The byte array or null on error.
+ */
+ public byte[] getInByteArray(String name);
+
+ /**
+ * Stores the byte array with the associated key.
+ *
+ * @param name The attribute name.
+ * @param value The value to store
+ * @return false on an error
+ */
+ public boolean set(String name, byte[] value);
+
+ /**
+ * Retrieves the Integer value for name.
+ *
+ * @param name The attribute name.
+ * @return The Integer or null on error.
+ */
+ public Integer getInInteger(String name);
+
+ /**
+ * Stores the Integer with the associated key.
+ *
+ * @param name The attribute name.
+ * @param value The value to store
+ * @return false on an error
+ */
+ public boolean set(String name, Integer value);
+
+ /**
+ * Retrieves the BigInteger array value for name.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
+ */
+ public BigInteger[] getInBigIntegerArray(String name);
+
+ /**
+ * Stores the BigInteger array with the associated key.
+ *
+ * @param name The attribute name.
+ * @param value The value to store
+ * @return false on an error
+ */
+ public boolean set(String name, BigInteger[] value);
+
+ /**
+ * Retrieves the Date value for name.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
+ */
+ public Date getInDate(String name);
+
+ /**
+ * Stores the Date with the associated key.
+ *
+ * @param name The attribute name.
+ * @param value The value to store
+ * @return false on an error
+ */
+ public boolean set(String name, Date value);
+
+ /**
+ * Retrieves the String array value for name.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
+ */
+ public String[] getInStringArray(String name);
+
+ /**
+ * Stores the String array with the associated key.
+ *
+ * @param name The attribute name.
+ * @param value The value to store
+ * @return False on error.
+ */
+ public boolean set(String name, String[] value);
+
+ /**
+ * Retrieves the X509CertImpl value for name.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
+ */
+ public X509CertImpl getInCert(String name);
+
+ /**
+ * Stores the X509CertImpl with the associated key.
+ *
+ * @param name The attribute name.
+ * @param value The value to store
+ * @return false on error
+ */
+ public boolean set(String name, X509CertImpl value);
+
+ /**
+ * Retrieves the CertificateExtensions value for name.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
+ */
+ public CertificateExtensions getInCertExts(String name);
+
+ /**
+ * Stores the CertificateExtensions with the associated key.
+ *
+ * @param name The attribute name.
+ * @param value The value to store
+ * @return false on error
+ */
+ public boolean set(String name, CertificateExtensions value);
+
+ /**
+ * Retrieves the Certificates value for name.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
+ */
+ public Certificates getInCertificates(String name);
+
+ /**
+ * Stores the Certificates with the associated key.
+ *
+ * @param name The attribute name.
+ * @param value The value to store
+ * @return false on error
+ */
+ public boolean set(String name, Certificates value);
+
+ /**
+ * Retrieves the byte[][] value for name.
+ *
+ * @param name The attribute name.
+ * @return The value or null on error.
+ */
+ public byte[][] getInByteArrayArray(String name);
+
+ /**
+ * Stores the byte[][] with the associated key.
+ *
+ * @param name The attribute name.
+ * @param value The value to store
+ * @return false on error
+ */
+ public boolean set(String name, byte[][] value);
+}