Rena Tsantouli 2009-09-03 12:12:58 +00:00
parent a28692650e
commit 1841e9e908
2 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,29 @@
package asl.authentication;
import org.gcube.application.framework.core.security.LDAPAuthenticationModule;
public class UserAuthentication {
public static void main(String[] args) {
System.setProperty("java.security.auth.login.config", "jaas.config");
//put real username - password here
String userName = "username";
String userPassword = "password";
boolean authenticated = false;
LDAPAuthenticationModule lala = new LDAPAuthenticationModule();
try {
authenticated = lala.checkAuthentication(userName, userPassword);
} catch (Throwable all) {
all.printStackTrace();
}
if (authenticated)
System.out.println("The user exists");
else
System.out.println("The user doesn't exist!");
}
}

16
test-suite/readme.txt Normal file
View File

@ -0,0 +1,16 @@
TEST SUITE FOR THE ASL CORE
-----------------------------------------------------------
-Author
* Rena Tsantouli (e.tsantoylh@di.uoa.gr)
User Authentication:
-Build
Dependencies: ApplicationSupportLayerCore.jar and (runtime dependencies): commons-logging.jar, jboss-common.jar, jbosssx.jar included with a standard JBoss Application Server.
-Set the System property "java.security.auth.login.config" pointing to the location where the configuration file "jaas.config" is placed.