Author: andreas
Date: Mon Dec 17 08:28:25 2007
New Revision: 604915
URL: http://svn.apache.org/viewvc?rev=604915&view=rev
Log:
Cleaned up TransientUser class.
Modified:
lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/TransientUser.java
lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/shibboleth/ShibbolethAuthenticator.java
Modified: lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/TransientUser.java
URL: http://svn.apache.org/viewvc/lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/TransientUser.java?rev=604915&r1=604914&r2=604915&view=diff
==============================================================================
--- lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/TransientUser.java (original)
+++ lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/impl/TransientUser.java Mon Dec 17 08:28:25 2007
@@ -17,44 +17,32 @@
*/
package org.apache.lenya.ac.impl;
-import java.io.File;
-import java.util.Arrays;
import java.util.HashMap;
-import java.util.HashSet;
import java.util.Map;
import java.util.Set;
-import org.apache.avalon.framework.configuration.Configuration;
-import org.apache.avalon.framework.configuration.ConfigurationException;
import org.apache.lenya.ac.AccessControlException;
-import org.apache.lenya.ac.Accreditable;
-import org.apache.lenya.ac.AccreditableManager;
-import org.apache.lenya.ac.AttributeOwner;
-import org.apache.lenya.ac.Group;
-import org.apache.lenya.ac.Identifiable;
-import org.apache.lenya.ac.ItemManager;
import org.apache.lenya.ac.User;
/**
* Class for users which are not stored in the CMS, but in an external directory
- * like LDAP.
+ * like LDAP or a Shibboleth identity provider.
*/
public class TransientUser implements User {
- private String id;
+ /**
+ * @param id The user ID.
+ */
+ public TransientUser(String id) {
+ this.id = id;
+ }
+ private String id;
+
public String getId() {
return this.id;
}
- public void setId(String string) {
- this.id = string;
- }
-
- public boolean isPersistent() {
- return false;
- }
-
private Map attributes = new HashMap();
public String[] getAttributeValues(String name) throws AccessControlException {
@@ -92,20 +80,12 @@
this.email = email;
}
- public void configure(Configuration configuration) throws ConfigurationException {
- throw new UnsupportedOperationException();
- }
-
public String getDescription() {
return this.description;
}
public String getName() {
return this.name;
- }
-
- public void setConfigurationDirectory(File configurationDirectory) {
- throw new UnsupportedOperationException();
}
public void setDescription(String description) {
Modified: lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/shibboleth/ShibbolethAuthenticator.java
URL: http://svn.apache.org/viewvc/lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/shibboleth/ShibbolethAuthenticator.java?rev=604915&r1=604914&r2=604915&view=diff
==============================================================================
--- lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/shibboleth/ShibbolethAuthenticator.java (original)
+++ lenya/branches/branch_1_2_x_shibboleth/src/java/org/apache/lenya/ac/shibboleth/ShibbolethAuthenticator.java Mon Dec 17 08:28:25 2007
@@ -41,7 +41,6 @@
import org.apache.lenya.ac.Identity;
import org.apache.lenya.ac.Policy;
import org.apache.lenya.ac.Role;
-import org.apache.lenya.ac.User;
import org.apache.lenya.ac.UserManager;
import org.apache.lenya.ac.UserReference;
import org.apache.lenya.ac.impl.DefaultAccessController;
@@ -140,8 +139,7 @@
+ "] exists, can't create transient user.");
handler.error("Shibboleth authentication error (see logfile for details).");
} else {
- TransientUser user = new TransientUser();
- user.setId(uniqueId);
+ TransientUser user = new TransientUser(uniqueId);
passAttributes(user, attributesMap);
updateIdentity(identity, user, userManager);
authenticated = true;
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.