Skip to content

Commit

Permalink
Merge upstream master
Browse files Browse the repository at this point in the history
  • Loading branch information
Shenali-SJ committed Dec 4, 2024
2 parents 8a8a7e3 + 099f51f commit 522b4da
Show file tree
Hide file tree
Showing 31 changed files with 1,096 additions and 402 deletions.
8 changes: 8 additions & 0 deletions modules/api-resources/api-resources-full/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -500,5 +500,13 @@
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.action.management.common</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.rule.metadata.v1</artifactId>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.rule.metadata.common</artifactId>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@
<import resource="classpath:META-INF/cxf/user-organization-v1-cxf.xml"/>
<import resource="classpath:META-INF/cxf/api-resource-server-v1-cxf.xml"/>
<import resource="classpath:META-INF/cxf/action-server-v1-cxf.xml"/>
<import resource="classpath:META-INF/cxf/rule-metadata-server-v1-cxf.xml"/>

<context:property-placeholder/>
<context:annotation-config/>
Expand Down Expand Up @@ -147,6 +148,7 @@
<bean class="org.wso2.carbon.identity.api.server.organization.selfservice.v1.SelfServiceApi"/>
<bean class="org.wso2.carbon.identity.api.server.api.resource.v1.MetaApi"/>
<bean class="org.wso2.carbon.identity.api.server.action.management.v1.ActionsApi"/>
<bean class="org.wso2.carbon.identity.api.server.rule.metadata.v1.RulesApi"/>
</jaxrs:serviceBeans>
<jaxrs:providers>
<bean class="com.fasterxml.jackson.jaxrs.json.JacksonJsonProvider">
Expand Down
10 changes: 10 additions & 0 deletions modules/api-resources/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -515,6 +515,16 @@
<artifactId>org.wso2.carbon.identity.api.server.action.management.common</artifactId>
<version>${identity.server.api.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.rule.metadata.v1</artifactId>
<version>${identity.server.api.version}</version>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.rule.metadata.common</artifactId>
<version>${identity.server.api.version}</version>
</dependency>

<!-- Legacy API dependencies -->
<dependency>
Expand Down
11 changes: 11 additions & 0 deletions modules/distribution/src/assembly/bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,17 @@
<include>**/</include>
</includes>
</fileSet>
<!--copy rule meta data files of rule metadata feature-->
<fileSet>
<directory>
../p2-profile-gen/target/wso2carbon-core-${carbon.kernel.version}/repository/resources/identity/rulemeta
</directory>
<outputDirectory>wso2is-${pom.version}/repository/resources/identity/rulemeta</outputDirectory>
<includes>
<include>**/*.json</include>
</includes>
</fileSet>

<fileSet>
<directory>src/repository/resources/conf/templates</directory>
<outputDirectory>wso2is-${pom.version}/repository/resources/conf/templates</outputDirectory>
Expand Down
13 changes: 0 additions & 13 deletions modules/integration/tests-integration/tests-backend/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -458,19 +458,6 @@
<goal>run</goal>
</goals>
</execution>
<execution>
<id>packaging-war-artifacts-oidc</id>
<phase>process-test-resources</phase>
<configuration>
<tasks>
<ant antfile="src/test/resources/artifacts/IS/oidc/oidc-sso-app-build.xml" target="playground.appone-app-build" />
<ant antfile="src/test/resources/artifacts/IS/oidc/oidc-sso-app-build.xml" target="playground.apptwo-app-build" />
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
<execution>
<id>packaging-war-artifacts-passivests</id>
<phase>process-test-resources</phase>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
import org.testng.annotations.Factory;
import org.testng.annotations.Test;
import org.wso2.carbon.automation.engine.context.TestUserMode;
import org.wso2.identity.integration.test.base.MockClientCallback;
import org.wso2.identity.integration.test.base.MockApplicationServer;
import org.wso2.identity.integration.test.base.MockSMSProvider;
import org.wso2.identity.integration.test.oidc.OIDCAbstractIntegrationTest;
import org.wso2.identity.integration.test.oidc.OIDCUtilTest;
Expand Down Expand Up @@ -90,7 +90,7 @@ public class PasswordlessSMSOTPAuthTestCase extends OIDCAbstractIntegrationTest
private String authorizationCode;

private MockSMSProvider mockSMSProvider;
private MockClientCallback mockClientCallback;
private MockApplicationServer mockApplicationServer;

private TestUserMode userMode;

Expand All @@ -116,8 +116,8 @@ public void testInit() throws Exception {
mockSMSProvider = new MockSMSProvider();
mockSMSProvider.start();

mockClientCallback = new MockClientCallback();
mockClientCallback.start();
mockApplicationServer = new MockApplicationServer();
mockApplicationServer.start();

super.init();

Expand Down Expand Up @@ -170,7 +170,7 @@ public void atEnd() throws Exception {
scim2RestClient.closeHttpClient();

mockSMSProvider.stop();
mockClientCallback.stop();
mockApplicationServer.stop();
}

@Test(groups = "wso2.is", description = "Test passwordless authentication with SMS OTP")
Expand All @@ -189,7 +189,7 @@ private void sendAuthorizeRequest() throws Exception {
List<NameValuePair> urlParameters = new ArrayList<>();
urlParameters.add(new BasicNameValuePair("response_type", OAuth2Constant.OAUTH2_GRANT_TYPE_CODE));
urlParameters.add(new BasicNameValuePair("client_id", oidcApplication.getClientId()));
urlParameters.add(new BasicNameValuePair("redirect_uri", MockClientCallback.CALLBACK_URL));
urlParameters.add(new BasicNameValuePair("redirect_uri", oidcApplication.getCallBackURL()));

urlParameters.add(new BasicNameValuePair("scope", "openid"));

Expand All @@ -212,7 +212,7 @@ private void performUserLogin() throws Exception {
HttpResponse response = sendLoginPostForOtp(client, sessionDataKey, mockSMSProvider.getOTP());
EntityUtils.consume(response.getEntity());

authorizationCode = mockClientCallback.getAuthorizationCode();
authorizationCode = mockApplicationServer.getAuthorizationCodeForApp(oidcApplication.getApplicationName());
assertNotNull(authorizationCode);
}

Expand Down Expand Up @@ -241,7 +241,7 @@ private HttpResponse sendTokenRequestForCodeGrant() throws Exception {
List<NameValuePair> urlParameters = new ArrayList<>();
urlParameters.add(new BasicNameValuePair("code", authorizationCode));
urlParameters.add(new BasicNameValuePair("grant_type", OAUTH2_GRANT_TYPE_AUTHORIZATION_CODE));
urlParameters.add(new BasicNameValuePair("redirect_uri", MockClientCallback.CALLBACK_URL));
urlParameters.add(new BasicNameValuePair("redirect_uri", oidcApplication.getCallBackURL()));
urlParameters.add(new BasicNameValuePair("client_id", oidcApplication.getClientSecret()));

urlParameters.add(new BasicNameValuePair("scope", "openid"));
Expand All @@ -259,9 +259,8 @@ private HttpResponse sendTokenRequestForCodeGrant() throws Exception {

private OIDCApplication initOIDCApplication() {

OIDCApplication playgroundApp = new OIDCApplication(OIDCUtilTest.playgroundAppOneAppName,
OIDCUtilTest.playgroundAppOneAppContext,
MockClientCallback.CALLBACK_URL);
OIDCApplication playgroundApp = new OIDCApplication(MockApplicationServer.Constants.APP1.NAME,
MockApplicationServer.Constants.APP1.CALLBACK_URL);
return playgroundApp;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private void checkAuthorizationCode(String sessionDataKeyConsent) throws Excepti

private void createAndRegisterPlaygroundApplication() throws Exception {

playgroundApp = new OIDCApplication(PLAYGROUND_APP_NAME, PLAYGROUND_APP_CONTEXT, PLAYGROUND_APP_CALLBACK_URI);
playgroundApp = new OIDCApplication(PLAYGROUND_APP_NAME, PLAYGROUND_APP_CALLBACK_URI);
playgroundApp.addRequiredClaim(OIDCUtilTest.emailClaimUri);
playgroundApp.addRequiredClaim(OIDCUtilTest.firstNameClaimUri);
playgroundApp.addRequiredClaim(OIDCUtilTest.lastNameClaimUri);
Expand Down
Loading

0 comments on commit 522b4da

Please sign in to comment.