{
boolean valid = false;
try
{
AuthSessionFactory api = AuthSessionFactory.getInstance(configPath);
AuthSession authSession = api.createUserSession();
int status = authSession.check(username, password);
authSession.close();
api.shutdown();
valid = (status == AuthSession.ACCESS_OK);
}
catch (Exception e)
{