Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/brh55/okta-smart-contract-demo
A serverless back-end deployment for Okta Identity X.
https://github.com/brh55/okta-smart-contract-demo
Last synced: 30 days ago
JSON representation
A serverless back-end deployment for Okta Identity X.
- Host: GitHub
- URL: https://github.com/brh55/okta-smart-contract-demo
- Owner: brh55
- Created: 2021-09-14T04:00:04.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2021-09-14T16:45:45.000Z (about 3 years ago)
- Last Synced: 2024-03-24T00:40:45.104Z (8 months ago)
- Language: JavaScript
- Homepage:
- Size: 30.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Okta Identity X - Inline Hook
This demonstrates a simple lambda that can read a smart contract by importing the contract owner's private key, reading a smart contract off-chain method, and patching an identity token.
## Usage
### DeploymentIn order to deploy the example, you need to run the following command:
```
$ serverless deploy
```After running deploy, you should see output similar to:
```bash
Serverless: Packaging service...
Serverless: Excluding development dependencies...
Serverless: Creating Stack...
Serverless: Checking Stack create progress...
........
Serverless: Stack create finished...
Serverless: Uploading CloudFormation file to S3...
Serverless: Uploading artifacts...
Serverless: Uploading service aws-node.zip file to S3 (711.23 KB)...
Serverless: Validating template...
Serverless: Updating Stack...
Serverless: Checking Stack update progress...
.................................
Serverless: Stack update finished...
Service Information
service: aws-node
stage: dev
region: us-east-1
stack: aws-node-dev
resources: 6
functions:
api: aws-node-dev-hello
layers:
None
```### Invocation
After successful deployment, you can invoke the deployed function by using the following command:
```bash
serverless invoke --function inline
```Which should result in response similar to the following:
```json
{
"statusCode": 200,
"body": "{\n \"message\": \"Go Serverless v2.0! Your function executed successfully!\",\n \"input\": {}\n}"
}
```### Local development
You can invoke your function locally by using the following command:
```bash
serverless invoke local --function hello
```Which should result in response similar to the following:
```
{
"statusCode": 200,
"body": "{\n \"message\": \"Go Serverless v2.0! Your function executed successfully!\",\n \"input\": \"\"\n}"
}
```