public static Object verifyCredentials(String authenticatorMethod,Properties credentials,Properties securityProperties,InternalLogWriter logWriter,InternalLogWriter securityLogWriter,DistributedMember member) throws AuthenticationRequiredException, AuthenticationFailedException {
  if (!AcceptorImpl.isAuthenticationRequired()) {
    return null;
  }
  Authenticator auth=null;
  try {
    if (AcceptorImpl.isIntegratedSecurity()) {
      return securityService.login(credentials);
    }
 else {
      Method instanceGetter=ClassLoadUtil.methodFromName(authenticatorMethod);
      auth=(Authenticator)instanceGetter.invoke(null,(Object[])null);
      auth.init(securityProperties,logWriter,securityLogWriter);
      return auth.authenticate(credentials,member);
    }
  }
 catch (  AuthenticationFailedException ex) {
    throw ex;
  }
catch (  Exception ex) {
    throw new AuthenticationFailedException(ex.getMessage(),ex);
  }
 finally {
    if (auth != null)     auth.close();
  }
}

public static Object verifyCredentials ( String authenticatorMethod , Properties credentials , Properties securityProperties , InternalLogWriter logWriter , InternalLogWriter securityLogWriter , DistributedMember member ) throws AuthenticationRequiredException , AuthenticationFailedException { if ( ! AcceptorImpl . isAuthenticationRequired ( ) ) { return null ; } Authenticator auth = null ; try { if ( AcceptorImpl . isIntegratedSecurity ( ) ) { return securityService . login ( credentials ) ; } else { Method instanceGetter = ClassLoadUtil . methodFromName ( authenticatorMethod ) ; auth = ( Authenticator ) instanceGetter . invoke ( null , ( Object [ ] ) null ) ; auth . init ( securityProperties , logWriter , securityLogWriter ) ; return auth . authenticate ( credentials , member ) ; } } catch ( AuthenticationFailedException ex ) { throw ex ; } catch ( Exception ex ) { throw new AuthenticationFailedException ( ex . getMessage ( ) , ex ) ; } finally { if ( auth != null ) auth . close ( ) ; } }
this could return either a subject or a principal depending on if it ' s integrated security or not
