forked from Sunbird-RC/sunbird-rc-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'release-2.0.0' into credential
- Loading branch information
Showing
127 changed files
with
14,083 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 2 additions & 2 deletions
4
java/apitest/src/test/java/e2e/registry/StudentWithPasswordRequest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
{ | ||
"userDetails": { | ||
"passkey": "abcd" | ||
"passkey": "abcd@12345" | ||
}, | ||
"contactDetails": { | ||
"mobile": "9876543210", | ||
"email": "[email protected]" | ||
} | ||
} | ||
} |
60 changes: 60 additions & 0 deletions
60
java/apitest/src/test/java/e2e/registry/fusionauth-registry.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
Feature: Registry api tests | ||
Background: | ||
* string registryUrl = "http://localhost:8081" | ||
* string authUrl = "http://localhost:9011" | ||
* url registryUrl | ||
* def admin_token = "" | ||
* def client_secret = 'a52c5f4a-89fd-40b9-aea2-3f711f14c889' | ||
* def sleep = function(millis){ java.lang.Thread.sleep(millis) } | ||
@env=fusionauth | ||
Scenario: Create student with password schema and verify if password is set | ||
# get admin token | ||
* url authUrl | ||
* path '/oauth2/token' | ||
* header Content-Type = 'application/x-www-form-urlencoded; charset=utf-8' | ||
* header Host = 'fusionauth:9011' | ||
* form field grant_type = 'password' | ||
* form field client_id = '85a03867-dccf-4882-adde-1a79aeec50df' | ||
* form field username = '[email protected]' | ||
* form field password = 'admin@12345' | ||
* method post | ||
Then status 200 | ||
And print response.access_token | ||
* def admin_token = 'Bearer ' + response.access_token | ||
# create student schema | ||
Given url registryUrl | ||
And path 'api/v1/Schema' | ||
And header Authorization = admin_token | ||
And request read('StudentWithPasswordSchemaRequest.json') | ||
When method post | ||
Then status 200 | ||
And response.params.status == "SUCCESSFUL" | ||
# invite entity for student | ||
Given url registryUrl | ||
And path 'api/v1/StudentWithPassword/invite' | ||
* def studentRequest = read('StudentWithPasswordRequest.json') | ||
And request studentRequest | ||
When method post | ||
Then status 200 | ||
* def studentOsid = response.result.StudentWithPassword.osid | ||
# get student token | ||
* url authUrl | ||
* path '/oauth2/token' | ||
* header Content-Type = 'application/x-www-form-urlencoded; charset=utf-8' | ||
* header Host = 'fusionauth:9011' | ||
* form field grant_type = 'password' | ||
* form field client_id = '85a03867-dccf-4882-adde-1a79aeec50df' | ||
* form field username = studentRequest.contactDetails.mobile | ||
* form field password = studentRequest.userDetails.passkey | ||
* method post | ||
Then status 200 | ||
And print response.access_token | ||
* def student_token = 'Bearer ' + response.access_token | ||
* sleep(3000) | ||
# get student info | ||
Given url registryUrl | ||
And path 'api/v1/StudentWithPassword/' | ||
And header Authorization = student_token | ||
When method get | ||
Then status 200 | ||
And response[0].osid.length > 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>registry-middleware</artifactId> | ||
<groupId>dev.sunbirdrc</groupId> | ||
<version>2.0.3</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>auth0</artifactId> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
|
||
</dependencies> | ||
</dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>com.auth0</groupId> | ||
<artifactId>auth0</artifactId> | ||
<version>2.3.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-context</artifactId> | ||
<version>5.0.2.RELEASE</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-web</artifactId> | ||
<version>5.0.2.RELEASE</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
<version>1.7.32</version> | ||
<scope>compile</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-test</artifactId> | ||
<scope>test</scope> | ||
<version>2.5.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>junit</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>4.12</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-test</artifactId> | ||
<version>5.3.9</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>dev.sunbirdrc</groupId> | ||
<artifactId>pojos</artifactId> | ||
<version>2.0.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>dev.sunbirdrc</groupId> | ||
<artifactId>middleware-commons</artifactId> | ||
<version>2.0.3</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>dev.sunbirdrc</groupId> | ||
<artifactId>identity-provider</artifactId> | ||
<version>2.0.3</version> | ||
</dependency> | ||
|
||
</dependencies> | ||
</project> |
Oops, something went wrong.