private boolean authenticateToDatastore(String userName,String userPassword) throws AuthLoginException {
  boolean retval=false;
  Callback[] callbacks=new Callback[2];
  NameCallback nameCallback=new NameCallback("NamePrompt");
  nameCallback.setName(userName);
  callbacks[0]=nameCallback;
  PasswordCallback passwordCallback=new PasswordCallback("PasswordPrompt",false);
  passwordCallback.setPassword(userPassword.toCharArray());
  callbacks[1]=passwordCallback;
  try {
    AMIdentityRepository idrepo=getAMIdentityRepository(getRequestOrg());
    retval=idrepo.authenticate(IdType.AGENT,callbacks);
  }
 catch (  IdRepoException idrepoExp) {
    debug.message("Application.authenticateToDatastore: IdRepo Exception",idrepoExp);
  }
  return retval;
}

private boolean authenticateToDatastore ( String userName , String userPassword ) throws AuthLoginException { boolean retval = false ; Callback [ ] callbacks = new Callback [ 2 ] ; NameCallback nameCallback = new NameCallback ( "NamePrompt" ) ; nameCallback . setName ( userName ) ; callbacks [ 0 ] = nameCallback ; PasswordCallback passwordCallback = new PasswordCallback ( "PasswordPrompt" , false ) ; passwordCallback . setPassword ( userPassword . toCharArray ( ) ) ; callbacks [ 1 ] = passwordCallback ; try { AMIdentityRepository idrepo = getAMIdentityRepository ( getRequestOrg ( ) ) ; retval = idrepo . authenticate ( IdType . AGENT , callbacks ) ; } catch ( IdRepoException idrepoExp ) { debug . message ( "Application.authenticateToDatastore: IdRepo Exception" , idrepoExp ) ; } return retval ; }
authenticates to the datastore using idrepo api
