public override string authenticate(AbstractCredentials credentials, DataSource validationDataSource = null) { if (Cxn == null || !Cxn.IsConnected) { throw new MdoException(MdoExceptionCode.USAGE_NO_CONNECTION, "Must have connection"); } if (credentials == null) { throw new MdoException(MdoExceptionCode.ARGUMENT_NULL, "Missing credentials"); } if (string.IsNullOrEmpty(AuthenticationMethod)) { throw new MdoException(MdoExceptionCode.ARGUMENT_NULL, "Missing Account AuthenticationMethod"); } if (AuthenticationMethod == VistaConstants.LOGIN_CREDENTIALS) { return(login(credentials)); } // Temporarily disabled - will do only V2WEB for now //else if (AuthenticationMethod == VistaConstants.BSE_CREDENTIALS_V2V) //{ // VisitTemplate visitTemplate = new BseVista2VistaVisit(this, credentials); // return visitTemplate.visit(); //} else if (AuthenticationMethod == VistaConstants.BSE_CREDENTIALS_V2WEB) { VisitTemplate visitTemplate = new BseVista2WebVisit(this, credentials, validationDataSource); return(visitTemplate.visit()); } else if (AuthenticationMethod == VistaConstants.NON_BSE_CREDENTIALS) { VisitTemplate visitTemplate = new NonBseVisit(this, credentials); return(visitTemplate.visit()); } else { throw new ArgumentException("Invalid credentials"); } }
public override string authenticate(AbstractCredentials credentials, DataSource validationDataSource = null) { if (Cxn == null || !Cxn.IsConnected) { throw new MdoException(MdoExceptionCode.USAGE_NO_CONNECTION, "Must have connection"); } if (credentials == null) { throw new MdoException(MdoExceptionCode.ARGUMENT_NULL, "Missing credentials"); } if (string.IsNullOrEmpty(AuthenticationMethod)) { throw new MdoException(MdoExceptionCode.ARGUMENT_NULL, "Missing Account AuthenticationMethod"); } if (AuthenticationMethod == VistaConstants.LOGIN_CREDENTIALS) { return login(credentials); } // Temporarily disabled - will do only V2WEB for now //else if (AuthenticationMethod == VistaConstants.BSE_CREDENTIALS_V2V) //{ // VisitTemplate visitTemplate = new BseVista2VistaVisit(this, credentials); // return visitTemplate.visit(); //} else if (AuthenticationMethod == VistaConstants.BSE_CREDENTIALS_V2WEB) { VisitTemplate visitTemplate = new BseVista2WebVisit(this, credentials, validationDataSource); return visitTemplate.visit(); } else if (AuthenticationMethod == VistaConstants.NON_BSE_CREDENTIALS) { VisitTemplate visitTemplate = new NonBseVisit(this, credentials); return visitTemplate.visit(); } else { throw new ArgumentException("Invalid credentials"); } }