Skip to content

Commit

Permalink
#66 - external test to check keycloak call
Browse files Browse the repository at this point in the history
  • Loading branch information
petmongrels committed May 12, 2023
1 parent 102d649 commit e2958b7
Showing 1 changed file with 24 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
package org.avni_integration_service.avni.client;

import org.avni_integration_service.avni.domain.auth.IdpDetailsResponse;
import org.avni_integration_service.avni.domain.auth.KeycloakDetails;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.*;

class AvniSessionET {
@Test
void getIdToken() {
AvniSession avniSession = new AvniSession("http://localhost:8021", "vin@jsscp", "password", true, IdpType.Keycloak);
IdpDetailsResponse idpDetailsResponse = new IdpDetailsResponse();
KeycloakDetails keycloak = new KeycloakDetails();
keycloak.setAuthServerUrl("http://localhost:8080");
keycloak.setClientId("avni-client");
keycloak.setGrantType("password");
keycloak.setRealm("On-premise");
keycloak.setScope("openid");
idpDetailsResponse.setKeycloak(keycloak);
String idToken = avniSession.fetchIdToken(idpDetailsResponse);
}
}

0 comments on commit e2958b7

Please sign in to comment.