use of org.sagebionetworks.bridge.models.accounts.SignIn in project BridgeServer2 by Sage-Bionetworks.
the class SignInValidatorTest method requestResetPasswordOK.
@Test
public void requestResetPasswordOK() {
SignIn signIn = new SignIn.Builder().withAppId(TEST_APP_ID).withEmail(EMAIL).build();
Validate.entityThrowingException(SignInValidator.REQUEST_RESET_PASSWORD, signIn);
signIn = new SignIn.Builder().withAppId(TEST_APP_ID).withPhone(TestConstants.PHONE).build();
Validate.entityThrowingException(SignInValidator.REQUEST_RESET_PASSWORD, signIn);
}
use of org.sagebionetworks.bridge.models.accounts.SignIn in project BridgeServer2 by Sage-Bionetworks.
the class SignInValidatorTest method reauthWithPhoneOK.
@Test
public void reauthWithPhoneOK() {
SignIn signIn = new SignIn.Builder().withAppId(TEST_APP_ID).withPhone(TestConstants.PHONE).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 blankExternalIdSignInInvalid.
@Test
public void blankExternalIdSignInInvalid() {
SignIn signIn = new SignIn.Builder().withAppId(TEST_APP_ID).withExternalId("").build();
assertValidatorMessage(SignInValidator.MINIMAL, signIn, "SignIn", "email, phone, or external ID is required");
}
use of org.sagebionetworks.bridge.models.accounts.SignIn in project BridgeServer2 by Sage-Bionetworks.
the class SignInValidatorTest method reauthWithEmailAndPhoneInvalid.
@Test
public void reauthWithEmailAndPhoneInvalid() {
SignIn signIn = new SignIn.Builder().withEmail(EMAIL).withPhone(TestConstants.PHONE).build();
assertValidatorMessage(SignInValidator.REAUTH_SIGNIN, signIn, "SignIn", "only provide one of email, phone, or external ID");
}
Aggregations