use of org.sagebionetworks.bridge.models.accounts.SignIn in project BridgeServer2 by Sage-Bionetworks.
the class SignInValidatorTest method reauthWithEmailOK.
@Test
public void reauthWithEmailOK() {
SignIn signIn = new SignIn.Builder().withAppId(TEST_APP_ID).withEmail(EMAIL).withReauthToken(REAUTH_TOKEN).build();
Validate.entityThrowingException(SignInValidator.REAUTH_SIGNIN, signIn);
}
use of org.sagebionetworks.bridge.models.accounts.SignIn in project BridgeServer2 by Sage-Bionetworks.
the class SignInValidatorTest method phoneSignInOK.
@Test
public void phoneSignInOK() {
SignIn signIn = new SignIn.Builder().withAppId(TEST_APP_ID).withPhone(TestConstants.PHONE).withToken(TOKEN).build();
Validate.entityThrowingException(SignInValidator.PHONE_SIGNIN, signIn);
}
use of org.sagebionetworks.bridge.models.accounts.SignIn in project BridgeServer2 by Sage-Bionetworks.
the class SignInValidatorTest method passwordSignInWithEmailOK.
@Test
public void passwordSignInWithEmailOK() {
SignIn signIn = new SignIn.Builder().withAppId(TEST_APP_ID).withEmail(EMAIL).withPassword(PASSWORD).build();
Validate.entityThrowingException(SignInValidator.PASSWORD_SIGNIN, signIn);
}
use of org.sagebionetworks.bridge.models.accounts.SignIn in project BridgeServer2 by Sage-Bionetworks.
the class SignInValidatorTest method minimalOK.
@Test
public void minimalOK() {
SignIn signIn = new SignIn.Builder().withAppId(TEST_APP_ID).withEmail(EMAIL).build();
Validate.entityThrowingException(SignInValidator.MINIMAL, signIn);
signIn = new SignIn.Builder().withAppId(TEST_APP_ID).withPhone(TestConstants.PHONE).build();
Validate.entityThrowingException(SignInValidator.MINIMAL, signIn);
}
use of org.sagebionetworks.bridge.models.accounts.SignIn in project BridgeServer2 by Sage-Bionetworks.
the class SignInValidatorTest method passwordSignInWithEmailAndPhoneInvalid.
@Test
public void passwordSignInWithEmailAndPhoneInvalid() {
SignIn signIn = new SignIn.Builder().withEmail(EMAIL).withPhone(TestConstants.PHONE).build();
assertValidatorMessage(SignInValidator.PASSWORD_SIGNIN, signIn, "SignIn", "only provide one of email, phone, or external ID");
}
Aggregations