-
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.
- Loading branch information
1 parent
9b6f2cb
commit 8b821f3
Showing
14 changed files
with
298 additions
and
40 deletions.
There are no files selected for viewing
21 changes: 21 additions & 0 deletions
21
packages/sample-app/src/repositories/GenerateSignedJwtRepository.ts
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,21 @@ | ||
/** | ||
* Created by Michael Avoyan on 11/07/2024. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { Dictionary } from "../Types"; | ||
import Urls from "../network/Urls"; | ||
import fetcher from "../network/Fetcher"; | ||
|
||
export const generateSignedJwt = async ( | ||
jwtDescriptor: Dictionary<any>, | ||
didJwk: Dictionary<any> | ||
): Promise<any> => { | ||
const config = { | ||
url: Urls.generateSignedJwt, | ||
method: 'POST', | ||
data: { jwtDescriptor, didJwk }, | ||
}; | ||
return await fetcher(config); | ||
} |
20 changes: 20 additions & 0 deletions
20
packages/sample-app/src/repositories/GetCredentialManifestToRefreshCredentialsRepository.ts
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,20 @@ | ||
/** | ||
* Created by Michael Avoyan on 11/07/2024. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { Dictionary } from "../Types"; | ||
import Urls from "../network/Urls"; | ||
import fetcher from "../network/Fetcher"; | ||
|
||
export const getCredentialManifestToRefreshCredentials = async ( | ||
credentialManifestDescriptorRefresh: Dictionary<any> | ||
): Promise<Dictionary<any>> => { | ||
const config = { | ||
url: Urls.getCredentialManifest, | ||
method: 'POST', | ||
data: credentialManifestDescriptorRefresh, | ||
}; | ||
return await fetcher(config); | ||
} |
20 changes: 20 additions & 0 deletions
20
packages/sample-app/src/repositories/GetCredentialTypesUIFormSchema.ts
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,20 @@ | ||
/** | ||
* Created by Michael Avoyan on 11/07/2024. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import Urls from "../network/Urls"; | ||
import fetcher from "../network/Fetcher"; | ||
import { Dictionary } from "../Types"; | ||
|
||
export const getCredentialTypesUIFormSchema = async ( | ||
credentialTypesUIFormSchemaDescriptor: Dictionary<any> | ||
): Promise<any> => { | ||
const config = { | ||
url: Urls.getCredentialTypesUIFormSchema, | ||
method: 'POST', | ||
data: credentialTypesUIFormSchemaDescriptor, | ||
}; | ||
return await fetcher(config); | ||
} |
20 changes: 20 additions & 0 deletions
20
packages/sample-app/src/repositories/GetVerifiedProfileRepository.ts
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,20 @@ | ||
/** | ||
* Created by Michael Avoyan on 11/07/2024. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { Dictionary } from "../Types"; | ||
import Urls from "../network/Urls"; | ||
import fetcher from "../network/Fetcher"; | ||
|
||
export const getVerifiedProfile = async ( | ||
verifiedProfileDescriptor: Dictionary<any> | ||
): Promise<any> => { | ||
const config = { | ||
url: Urls.getVerifiedProfile, | ||
method: 'POST', | ||
data: verifiedProfileDescriptor, | ||
}; | ||
return await fetcher(config); | ||
} |
21 changes: 21 additions & 0 deletions
21
packages/sample-app/src/repositories/VerifyJwtRepository.ts
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,21 @@ | ||
/** | ||
* Created by Michael Avoyan on 11/07/2024. | ||
* | ||
* Copyright 2022 Velocity Career Labs inc. | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
import { Dictionary } from "../Types"; | ||
import Urls from "../network/Urls"; | ||
import fetcher from "../network/Fetcher"; | ||
|
||
export const verifyJwt = async ( | ||
jwt: Dictionary<any>, | ||
publicJwk: Dictionary<any> | ||
): Promise<any> => { | ||
const config = { | ||
url: Urls.verifyJwt, | ||
method: 'POST', | ||
data: { jwt, publicJwk }, | ||
}; | ||
return await fetcher(config); | ||
} |
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
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
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
36 changes: 36 additions & 0 deletions
36
packages/sample-server/src/test-apis/GetCredentialManifestToRefreshCredentials.http
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,36 @@ | ||
### Get Credential Manifest To Refresh Credentials | ||
POST http://localhost:5000/getCredentialManifest HTTP/1.1 | ||
Content-Type: application/json | ||
|
||
{ | ||
"service": {"type":"VlcCareerIssuer_v1","id":"#velocity-issuer-1","serviceEndpoint":"https:\/\/devagent.velocitycareerlabs.io\/api\/holder\/v0.6\/org\/did:ion:EiApMLdMb4NPb8sae9-hXGHP79W1gisApVSE80USPEbtJA\/issue\/get-credential-manifest","credentialTypes":["EducationDegree","EducationDegreeRegistrationV1.0","EducationDegreeStudyV1.0","EducationDegreeGraduationV1.0","EducationDegreeRegistrationV1.1","EducationDegreeStudyV1.1","EducationDegreeGraduationV1.1","PastEmploymentPosition","CurrentEmploymentPosition","EmploymentCurrentV1.0","EmploymentPastV1.0","EmploymentCurrentV1.1","EmploymentPastV1.1","Certification","CertificationV1.0","LicenseV1.0","CertificationV1.1","LicenseV1.1","Course","CourseRegistrationV1.0","CourseCompletionV1.0","CourseAttendanceV1.0","CourseRegistrationV1.1","CourseCompletionV1.1","CourseAttendanceV1.1","AssessmentDec2020","AssessmentV1.0","AssessmentV1.1","Badge","OpenBadgeV1.0"]}, | ||
"credentialIds": [ | ||
"did:velocity:v2:0x2bef092530ccc122f5fe439b78eddf6010685e88:248532930732481:1963", | ||
"did:velocity:v2:0x2bef092530ccc122f5fe439b78eddf6010685e88:248532930732481:1963" | ||
], | ||
"didJwk": { | ||
"payload": { | ||
"did": "did:jwk:eyJjcnYiOiJQLTI1NiIsImt0eSI6IkVDIiwieCI6IkFYQWxaWThqNGh5cm10dzBoRjNrLTJWT080THZXRzBLNEF5a0JYS25HVWciLCJ5IjoiYzlEVHE5cVRWUTlRQmlsLUgxdGRWN3FZZERic3BhTG5wZ0FJdkRKeEpHayJ9", | ||
"kid": "did:jwk:eyJjcnYiOiJQLTI1NiIsImt0eSI6IkVDIiwieCI6IkFYQWxaWThqNGh5cm10dzBoRjNrLTJWT080THZXRzBLNEF5a0JYS25HVWciLCJ5IjoiYzlEVHE5cVRWUTlRQmlsLUgxdGRWN3FZZERic3BhTG5wZ0FJdkRKeEpHayJ9#0", | ||
"keyId": "Iv5pwCQfp6e5FsncVgVX0", | ||
"publicJwk": { | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"y": "c9DTq9qTVQ9QBil-H1tdV7qYdDbspaLnpgAIvDJxJGk", | ||
"x": "AXAlZY8j4hyrmtw0hF3k-2VOO4LvWG0K4AykBXKnGUg" | ||
} | ||
}, | ||
"did": "did:jwk:eyJjcnYiOiJQLTI1NiIsImt0eSI6IkVDIiwieCI6IkFYQWxaWThqNGh5cm10dzBoRjNrLTJWT080THZXRzBLNEF5a0JYS25HVWciLCJ5IjoiYzlEVHE5cVRWUTlRQmlsLUgxdGRWN3FZZERic3BhTG5wZ0FJdkRKeEpHayJ9", | ||
"publicJwk": { | ||
"valueStr": "{\"kty\":\"EC\",\"crv\":\"P-256\",\"y\":\"c9DTq9qTVQ9QBil-H1tdV7qYdDbspaLnpgAIvDJxJGk\",\"x\":\"AXAlZY8j4hyrmtw0hF3k-2VOO4LvWG0K4AykBXKnGUg\"}", | ||
"valueJson": { | ||
"kty": "EC", | ||
"crv": "P-256", | ||
"y": "c9DTq9qTVQ9QBil-H1tdV7qYdDbspaLnpgAIvDJxJGk", | ||
"x": "AXAlZY8j4hyrmtw0hF3k-2VOO4LvWG0K4AykBXKnGUg" | ||
} | ||
}, | ||
"kid": "did:jwk:eyJjcnYiOiJQLTI1NiIsImt0eSI6IkVDIiwieCI6IkFYQWxaWThqNGh5cm10dzBoRjNrLTJWT080THZXRzBLNEF5a0JYS25HVWciLCJ5IjoiYzlEVHE5cVRWUTlRQmlsLUgxdGRWN3FZZERic3BhTG5wZ0FJdkRKeEpHayJ9#0", | ||
"keyId": "Iv5pwCQfp6e5FsncVgVX0" | ||
} | ||
} |
Oops, something went wrong.