Update of /var/cvs/src/org/mmbase/security
In directory james.mmbase.org:/tmp/cvs-serv18833

Modified Files:
        Authentication.java AuthenticationData.java 
Log Message:
Made it possible to communicate certain details about security implenetnation 
to the user


See also: http://cvs.mmbase.org/viewcvs/src/org/mmbase/security


Index: Authentication.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/security/Authentication.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -b -r1.42 -r1.43
--- Authentication.java 25 Mar 2008 21:00:24 -0000      1.42
+++ Authentication.java 17 Jul 2008 15:58:52 -0000      1.43
@@ -24,11 +24,13 @@
  *
  * @author Eduard Witteveen
  * @author Michiel Meeuwissen (javadocs)
- * @version $Id: Authentication.java,v 1.42 2008/03/25 21:00:24 nklasens Exp $
+ * @version $Id: Authentication.java,v 1.43 2008/07/17 15:58:52 michiel Exp $
  */
 public abstract class Authentication extends Configurable implements 
AuthenticationData {
     private static final Logger log = 
Logging.getLoggerInstance(Authentication.class);
 
+
+    protected final Map<String, Object> attributes = new 
java.util.concurrent.ConcurrentHashMap<String, Object>();
     static {
         try {
             PARAMETER_USERNAME.getLocalizedDescription().setBundle(STRINGS);
@@ -205,4 +207,8 @@
     public long getKey() {
         return key;
     }
+
+    public Object getAttribute(String key) {
+        return attributes.get(key);
+    }
 }


Index: AuthenticationData.java
===================================================================
RCS file: /var/cvs/src/org/mmbase/security/AuthenticationData.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- AuthenticationData.java     25 Mar 2008 21:00:24 -0000      1.10
+++ AuthenticationData.java     17 Jul 2008 15:58:52 -0000      1.11
@@ -15,7 +15,7 @@
  * This interface represents information about the authentication 
implementation.
  *
  * @author Michiel Meeuwissen
- * @version $Id: AuthenticationData.java,v 1.10 2008/03/25 21:00:24 nklasens 
Exp $
+ * @version $Id: AuthenticationData.java,v 1.11 2008/07/17 15:58:52 michiel 
Exp $
  * @since MMBase-1.8
  */
 public interface AuthenticationData {
@@ -102,6 +102,8 @@
     static final Parameter PARAMETER_AUTHENTICATE  = new 
Parameter("authenticate", String.class);
 
 
+    static final String STORES_CONTEXT_IN_OWNER  = "stores context in owner";
+
     /**
      * The method returns whether the UserContext has become invalid for some 
reason (change in security config?)
      * @param userContext The UserContext of which we want to know the rights
@@ -180,4 +182,10 @@
      * which tells you exactly which parameters you can and must supply to 
[EMAIL PROTECTED] Authentication#login(String, java.util.Map, Object[])}.
      */
     Parameters createParameters(String application);
+
+    /**
+     * Allows the user to retrieve specific attributes on the underlying 
implementation.
+     * @since MMBase-1.9
+     */
+    Object getAttribute(String name);
 }
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to