summaryrefslogtreecommitdiffstats
path: root/simple/simple-http/src/main/java/org/simpleframework/http/Principal.java
diff options
context:
space:
mode:
Diffstat (limited to 'simple/simple-http/src/main/java/org/simpleframework/http/Principal.java')
-rw-r--r--simple/simple-http/src/main/java/org/simpleframework/http/Principal.java48
1 files changed, 48 insertions, 0 deletions
diff --git a/simple/simple-http/src/main/java/org/simpleframework/http/Principal.java b/simple/simple-http/src/main/java/org/simpleframework/http/Principal.java
new file mode 100644
index 0000000..361e4c1
--- /dev/null
+++ b/simple/simple-http/src/main/java/org/simpleframework/http/Principal.java
@@ -0,0 +1,48 @@
+/*
+ * Principal.java November 2002
+ *
+ * Copyright (C) 2002, Niall Gallagher <niallg@users.sf.net>
+ *
+ * Licensed 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.simpleframework.http;
+
+/**
+ * The <code>Principal</code> interface is used to describe a
+ * user that has a name and password. This should not be
+ * confused with the <code>java.security.Principal</code>
+ * interface which does not provide <code>getPassword</code>.
+ *
+ * @author Niall Gallagher
+ */
+public interface Principal {
+
+ /**
+ * The <code>getPassword</code> method is used to retrieve
+ * the password of the principal. This is the password
+ * tag in the RFC 2616 Authorization credentials expression.
+ *
+ * @return this returns the password for this principal
+ */
+ String getPassword();
+
+ /**
+ * The <code>getName</code> method is used to retreive
+ * the name of the principal. This is the name tag in
+ * the RFC 2616 Authorization credentials expression.
+ *
+ * @return this returns the name of this principal
+ */
+ String getName();
+}