Skip to content

Commit

Permalink
Remove installation id from register web login
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielpessoa1 committed Nov 17, 2023
1 parent 5eba8d3 commit d2d65a7
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ IncogniaAPI api = new IncogniaAPI("client-id", "client-secret");
try {
RegisterLoginRequest registerLoginRequest =
RegisterLoginRequest.builder()
.installationId("installation id")
.accountId("account id")
.externalId("external id")
.sessionToken("session-token")
Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/incognia/api/IncogniaAPI.java
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,6 @@ public TransactionAssessment registerLogin(RegisterLoginRequest request)
* IncogniaAPI api = new IncogniaAPI("client-id", "client-secret", Region.BR);
* try {
* RegisterLoginRequest loginRequest = RegisterLoginRequest.builder()
* .installationId("installation-id")
* .accountId("account-id")
* .externalId("external-id")
* .sessionToken("session-token")
Expand All @@ -232,12 +231,10 @@ public TransactionAssessment registerLogin(RegisterLoginRequest request)
public TransactionAssessment registerWebLogin(RegisterWebLoginRequest request)
throws IncogniaException {
Asserts.assertNotNull(request, "register login request");
Asserts.assertNotEmpty(request.getInstallationId(), "installation id");
Asserts.assertNotEmpty(request.getAccountId(), "account id");
Asserts.assertNotEmpty(request.getSessionToken(), "session token");
PostTransactionRequestBody requestBody =
PostTransactionRequestBody.builder()
.installationId(request.getInstallationId())
.accountId(request.getAccountId())
.externalId(request.getExternalId())
.sessionToken(request.getSessionToken())
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
@Value
@Builder
public class RegisterWebLoginRequest {
String installationId;
String accountId;
String externalId;
String sessionToken;
Expand Down
3 changes: 0 additions & 3 deletions src/test/java/com/incognia/api/IncogniaAPITest.java
Original file line number Diff line number Diff line change
Expand Up @@ -227,15 +227,13 @@ void testRegisterLogin_whenDataIsValid(Boolean eval) {
@SneakyThrows
void testRegisterWebLogin_whenDataIsValid(Boolean eval) {
String token = TokenCreationFixture.createToken();
String installationId = "installation-id";
String accountId = "account-id";
String externalId = "external-id";
String sessionToken = "session-token";

TokenAwareDispatcher dispatcher = new TokenAwareDispatcher(token, CLIENT_ID, CLIENT_SECRET);
dispatcher.setExpectedTransactionRequestBody(
PostTransactionRequestBody.builder()
.installationId(installationId)
.externalId(externalId)
.accountId(accountId)
.type("login")
Expand All @@ -246,7 +244,6 @@ void testRegisterWebLogin_whenDataIsValid(Boolean eval) {
mockServer.setDispatcher(dispatcher);
RegisterWebLoginRequest loginRequest =
RegisterWebLoginRequest.builder()
.installationId(installationId)
.accountId(accountId)
.externalId(externalId)
.evaluateTransaction(eval)
Expand Down

0 comments on commit d2d65a7

Please sign in to comment.