Skip to content

Commit

Permalink
SAK-4570 User Id / Eid work
Browse files Browse the repository at this point in the history
git-svn-id: https://source.sakaiproject.org/svn/providers/trunk@9187 66ffb92e-73f9-0310-93c1-f5514f145a0a
  • Loading branch information
Glenn R. Golden committed May 9, 2006
1 parent 996ac60 commit 65eb3ba
Show file tree
Hide file tree
Showing 14 changed files with 1,330 additions and 1,061 deletions.
14 changes: 12 additions & 2 deletions providers/component/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@
<dependencies>

<!-- Needed for the sample provider
-->
<dependency>
<groupId>sakaiproject</groupId>
<artifactId>sakai-legacy-provider</artifactId>
<artifactId>sakai-sample-provider</artifactId>
<version>${sakai.version}</version>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>
-->
<!-- -->

<!-- Needed for the JLDAP Provider
<dependency>
Expand Down Expand Up @@ -73,6 +74,15 @@
</dependency>
-->

<dependency>
<groupId>sakaiproject</groupId>
<artifactId>sakai-util</artifactId>
<version>${sakai.version}</version>
<properties>
<war.bundle>true</war.bundle>
</properties>
</dependency>

</dependencies>

<build>
Expand Down
25 changes: 8 additions & 17 deletions providers/component/src/webapp/WEB-INF/components.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,12 @@

<beans>

<bean id="org.sakaiproject.service.legacy.coursemanagement.CourseManagementProvider"
class="org.sakaiproject.component.legacy.coursemanagement.SampleCourseManagementProvider"
init-method="init"
destroy-method="destroy"
singleton="true">
</bean>

<!-- Uncomment to use the sample GroupProvider (read the code to see exactly what it does!)
Make sure to remove any other GroupProviders as there can only be one group provider active at any time.
<bean id="org.sakaiproject.service.legacy.authzGroup.GroupProvider"
class="org.sakaiproject.component.legacy.authzGroup.SampleGroupProvider"
<bean id="org.sakaiproject.authz.api.GroupProvider"
class="org.sakaiproject.provider.authzGroup.SampleGroupProvider"
init-method="init"
destroy-method="destroy"
singleton="true">
Expand All @@ -26,8 +19,8 @@
Make sure to remove any other UserDirectoryProviders as there can only be one user provider active at any time.
<bean id="org.sakaiproject.service.legacy.user.UserDirectoryProvider"
class="org.sakaiproject.component.legacy.user.SampleUserDirectoryProvider"
<bean id="org.sakaiproject.user.api.UserDirectoryProvider"
class="org.sakaiproject.provider.user.SampleUserDirectoryProvider"
init-method="init"
destroy-method="destroy"
singleton="true">
Expand All @@ -38,12 +31,12 @@
Make sure to remove any other UserDirectoryProviders as there can only be one user provider active at any time.
<bean id="org.sakaiproject.service.legacy.user.UserDirectoryProvider"
<bean id="org.sakaiproject.user.api.UserDirectoryProvider"
class="org.sakaiproject.component.imsent.user.IMSEntUserDirectoryProvider"
init-method="init"
destroy-method="destroy"
singleton="true">
<property name="sqlService"><ref bean="org.sakaiproject.service.framework.sql.SqlService"/></property>
<property name="sqlService"><ref bean="org.sakaiproject.db.api.SqlService"/></property>
<property name="autoDdl"><value>true</value></property>
</bean>
-->
Expand All @@ -55,12 +48,11 @@
Make sure to remove any other UserDirectoryProviders as there can only be one user provider active at any time.
<bean id="org.sakaiproject.service.legacy.user.UserDirectoryProvider"
<bean id="org.sakaiproject.user.api.UserDirectoryProvider"
class="edu.amc.sakai.user.JLDAPDirectoryProvider"
init-method="init"
destroy-method="destroy"
singleton="true">
<property name="logger"><ref bean="org.sakaiproject.service.framework.log.Logger"/></property>
<property name="ldapHost"><value>nldap.com</value></property>
<property name="ldapPort"><value>389</value></property>
<property name="secureConnection"><value>false</value></property>
Expand All @@ -86,12 +78,11 @@
Make sure to remove any other UserDirectoryProviders as there can only be one user provider active at any time.
<bean id="org.sakaiproject.service.legacy.user.UserDirectoryProvider"
<bean id="org.sakaiproject.user.api.UserDirectoryProvider"
class="org.sakaiproject.component.kerberos.user.KerberosUserDirectoryProvider"
init-method="init"
destroy-method="destroy"
singleton="true">
<property name="logger"><ref bean="org.sakaiproject.service.framework.log.Logger"/></property>
<property name="domain"><value>mydomain.edu</value></property>
<property name="loginContext"><value>KerberosAuthentication</value></property>
<property name="cachettl"><value>600000</value></property>
Expand Down
36 changes: 36 additions & 0 deletions providers/imsent/project.xml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,42 @@
<version>1.0.4</version>
</dependency>

<dependency>
<groupId>sakaiproject</groupId>
<artifactId>sakai-authz-api</artifactId>
<version>${sakai.version}</version>
</dependency>

<dependency>
<groupId>sakaiproject</groupId>
<artifactId>sakai-entity-api</artifactId>
<version>${sakai.version}</version>
</dependency>

<dependency>
<groupId>sakaiproject</groupId>
<artifactId>sakai-user-api</artifactId>
<version>${sakai.version}</version>
</dependency>

<dependency>
<groupId>sakaiproject</groupId>
<artifactId>sakai-util-api</artifactId>
<version>${sakai.version}</version>
</dependency>

<dependency>
<groupId>sakaiproject</groupId>
<artifactId>sakai-db-api</artifactId>
<version>${sakai.version}</version>
</dependency>

<dependency>
<groupId>sakaiproject</groupId>
<artifactId>sakai-util</artifactId>
<version>${sakai.version}</version>
</dependency>

</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,80 +1,65 @@
/**********************************************************************************
* $URL$
* $Id$
**********************************************************************************
***********************************************************************************
*
* Copyright (c) 2003, 2004, 2005 The Regents of the University of Michigan, Trustees of Indiana University,
* Board of Trustees of the Leland Stanford, Jr., University, and The MIT Corporation
* Copyright (c) 2003, 2004, 2005, 2006 The Sakai Foundation.
*
* Licensed under the Educational Community License Version 1.0 (the "License");
* By obtaining, using and/or copying this Original Work, you agree that you have read,
* understand, and will comply with the terms and conditions of the Educational Community License.
* You may obtain a copy of the License at:
* Licensed under the Educational Community License, Version 1.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://cvs.sakaiproject.org/licenses/license_1_0.html
* http://www.opensource.org/licenses/ecl1.php
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE
* AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
* DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* 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.
*
**********************************************************************************/

/*
* Created on May 6, 2005
*
* TODO To change the template for this generated file go to
* Window - Preferences - Java - Code Style - Code Templates
*/
package org.sakaiproject.component.imsent.user;

import org.sakaiproject.service.legacy.authzGroup.GroupProvider;
import org.sakaiproject.service.legacy.coursemanagement.CourseManagementProvider;
import org.sakaiproject.service.legacy.user.UserDirectoryProvider;
import org.sakaiproject.authz.api.GroupProvider;
import org.sakaiproject.user.api.UserDirectoryProvider;

public class IMSEntProviderUnitTest {
public class IMSEntProviderUnitTest
{

/**********************************************************************************************************************************************************************************************************************************************************
* In-House Unit Check
*********************************************************************************************************************************************************************************************************************************************************/

// TODO: Make these real unit tests

private static boolean m_passUnitTest = true;

private static void passFail(boolean testVal, String message)
{
if (testVal)
{
System.out.println("Passed unit Test"+message);
System.out.println("Passed unit Test" + message);
}
else
{
System.out.println("Failed Unit Test:"+message);
m_passUnitTest = false;
System.out.println("Failed Unit Test:" + message);
m_passUnitTest = false;
}
}

public static boolean localUnitTests(UserDirectoryProvider udp, GroupProvider rp,
CourseManagementProvider cp)
public static boolean localUnitTests(UserDirectoryProvider udp, GroupProvider rp)
{
m_passUnitTest = true; // Assume we pass
if ( udp != null )
m_passUnitTest = true; // Assume we pass
if (udp != null)
{
passFail( ! udp.userExists("user1"), "Checking existing user retrieval (user1)");
passFail ( udp.userExists("user7"), "Non existent user test (user7)");
passFail(!udp.userExists("user1"), "Checking existing user retrieval (user1)");
passFail(udp.userExists("user7"), "Non existent user test (user7)");
}
if ( rp != null )
if (rp != null)
{
System.out.println("Testing RP");
}
if ( cp != null )
{
System.out.println("Testing CP");
}

return m_passUnitTest;

}
}
Loading

0 comments on commit 65eb3ba

Please sign in to comment.