Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add success API tests for IdPs with user defined authenticators #21847

Prev Previous commit
Next Next commit
Bump api-server version
  • Loading branch information
Shenali-SJ committed Dec 3, 2024
commit bca65612b8bd18f916d6872a149d6c3824abe953
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public class IdPSuccessTest extends IdPTestBase {
private static final String FEDERATED_AUTHENTICATOR_PLACEHOLDER = "\"<FEDERATED_AUTHENTICATOR>\"";
private static final String IDP_NAME_PLACEHOLDER = "<IDP_NAME>";
private static final String FEDERATED_AUTHENTICATOR_ID = "Y3VzdG9tQXV0aGVudGljYXRvcg";
private static final String IDP_NAME = "Custom Auth IDP";
private static final String CUSTOM_IDP_NAME = "Custom Auth IDP";
private static final String ENDPOINT_URI = "https://abc.com/authenticate";
private static final String UPDATED_ENDPOINT_URI = "https://xyz.com/authenticate";
private static final String USERNAME = "username";
Expand All @@ -66,12 +66,12 @@ public class IdPSuccessTest extends IdPTestBase {
private static final String USERNAME_VALUE = "testUser";
private static final String ACCESS_TOKEN_VALUE = "testBearerToken";
private static final String PASSWORD_VALUE = "testPassword";
private static final String IDP_NAME = "Google";
private String idPId;
private String customIdPId;
private String idPTemplateId;
private UserDefinedAuthenticatorPayload userDefinedAuthenticatorPayload;
private String idpCreatePayload;
private static final String IDP_NAME = "Google";

@Factory(dataProvider = "restAPIUserConfigProvider")
public IdPSuccessTest(TestUserMode userMode) throws Exception {
Expand Down Expand Up @@ -333,7 +333,7 @@ public void testAddIdPWithUserDefinedAuthenticator() throws IOException {
userDefinedAuthenticatorPayload.getAuthenticatorId());
body = body.replace(FEDERATED_AUTHENTICATOR_PLACEHOLDER,
userDefinedAuthenticatorPayload.convertToJasonPayload());
body = body.replace(IDP_NAME_PLACEHOLDER, IDP_NAME);
body = body.replace(IDP_NAME_PLACEHOLDER, CUSTOM_IDP_NAME);
Response response = getResponseOfPost(IDP_API_BASE_PATH, body);
response.then()
.log().ifValidationFails()
Expand Down Expand Up @@ -463,7 +463,7 @@ public void testGetIdPs() throws Exception {
.body(baseIdentifier + "self", equalTo(getTenantedRelativePath(
"/api/server/v1/identity-providers/" + idPId,
context.getContextTenant().getDomain())))
.body(baseIdentifierUserDef + "name", equalTo(IDP_NAME))
.body(baseIdentifierUserDef + "name", equalTo(CUSTOM_IDP_NAME))
.body(baseIdentifierUserDef + "isEnabled", equalTo(true))
.body(baseIdentifierUserDef + "self", equalTo(getTenantedRelativePath(
"/api/server/v1/identity-providers/" + customIdPId,
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2456,7 +2456,7 @@

<!-- Identity REST API feature -->
<identity.api.dispatcher.version>2.0.17</identity.api.dispatcher.version>
<identity.server.api.version>1.3.2</identity.server.api.version>
<identity.server.api.version>1.3.3</identity.server.api.version>
<identity.user.api.version>1.3.45</identity.user.api.version>

<identity.agent.sso.version>5.5.9</identity.agent.sso.version>
Expand Down