{"id":19139942,"url":"https://github.com/arcblock/forge-workshop","last_synced_at":"2025-08-18T08:08:08.765Z","repository":{"id":43906484,"uuid":"169326075","full_name":"ArcBlock/forge-workshop","owner":"ArcBlock","description":"Simple workshop for developers to quickly develop, design and debug the DID flow.","archived":false,"fork":false,"pushed_at":"2023-01-10T22:25:00.000Z","size":1453,"stargazers_count":1,"open_issues_count":12,"forks_count":0,"subscribers_count":24,"default_branch":"master","last_synced_at":"2025-02-22T18:50:56.822Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ArcBlock.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-02-05T22:57:13.000Z","updated_at":"2020-03-15T07:50:23.000Z","dependencies_parsed_at":"2023-02-08T20:31:46.247Z","dependency_job_id":null,"html_url":"https://github.com/ArcBlock/forge-workshop","commit_stats":null,"previous_names":[],"tags_count":58,"template":false,"template_full_name":null,"purl":"pkg:github/ArcBlock/forge-workshop","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fforge-workshop","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fforge-workshop/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fforge-workshop/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fforge-workshop/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ArcBlock","download_url":"https://codeload.github.com/ArcBlock/forge-workshop/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ArcBlock%2Fforge-workshop/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270962391,"owners_count":24675965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T07:15:43.035Z","updated_at":"2025-08-18T08:08:08.738Z","avatar_url":"https://github.com/ArcBlock.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"## forge-workshop\n\nSimple workshop for developers to quickly develop, design and debug the DID flow.\n\n## Initialize\n\n```bash\nmake init\n```\n\n## Run \n\n```bash\nmake run\n```\n\n## Usage\n\n1. Go to `localhost:4000` you will see a page to generate a DID. In this page you need to choose the claims you want and the algorithms to generate a DID.\n2. Click the *GENERATE* button, a QR code will be displayed to you. The QR code is a JSON object that contains the callback url and a challenge signed by the secret key of the generated DID. The challenge can be decoded as:\n```json\n{\n  \"alg\": \"Ed25519\",\n  \"typ\": \"JWT\"\n}\n{\n  \"iss\": \"Newly generated APP DID\",\n  \"iat\": \"timestamp when the challenge is signed\",\n  \"nbf\": \"not before time\",\n  \"exp\": \"expire time\"\n}\n```\n3. Assume that you have a wallet to parse this challenge. Specifically, the wallet should \n  1. validate if the challenge is correctly signed \n  2. generate a user DID based on the APP DID according to BIP32\n4. The wallet should send a `POST` method to the callback url with following data:\n```json\n{\n  \"user_pk\": \"the public key of the user did\",\n  \"challenge\": \"the log on challenge\"\n}\n```\nThe challenge is decoded as:\n```json\n{\n  \"alg\": \"Ed25519 or SECP256K1\",\n  \"typ\": \"JWT\"\n}\n{\n  \"iss\": \"user_did\",\n  \"iat\": \"timestamp when the challenge is signed\",\n  \"nbf\": \"not before time\",\n  \"exp\": \"expire time\"\n}\n```\n5. In stead of using a mobile app to send the logon request as in step 4, you can directly `curl` it like: \n```bash\ncurl http://192.168.1.8:4000/api/logon?user_did=did:abt:z1XmG17q3DTjcpHPCx2VyepaV16vhCtrdfd\n```\n6. After send the logon request, you will get a response like following. If you decode the above challenge, you will find the requested claims inside of it.\n```json\n{\n  \"app_pk\":\"572551333538aef80fa67ec6ba2a7bfe483611d0847892065d868c74fc7ea7ec\",\"challenge\":\"eyJhbGciOiJFZDI1NTE5IiwidHlwIjoiSldUIn0.eyJyZXF1ZXN0ZWRDbGFpbXMiOlt7Im1ldGEiOnsiZGVzY3JpcHRpb24iOiJQbGVhc2UgcHJvdmlkZSB5b3VyIHByb2ZpbGUgaW5mb3JtYXRpb24uIn0sInBhcmFtZXRlcnMiOlsiYmlydGhkYXkiLCJmdWxsTmFtZSIsInNzbiJdLCJ0eXBlIjoicHJvZmlsZSJ9XSwicmVzcG9uc2VBdXRoIjoiaHR0cDovLzE5Mi4xNjguMS44L2FwaS9sb2dvbi8iLCJleHAiOiIxNTUwMDI1NDc2IiwiaWF0IjoiMTU1MDAyMzY3NiIsImlzcyI6ImRpZDphYnQ6ejExTFNRQzVaOG9UeVZSa05RYnNnZ2VxR1REYlgxTWsxRjhrIiwibmJmIjoiMTU1MDAyMzY3NiJ9.fmQVqtSXGKZfz2fI4r5dPCaHVu3Jg5y_EL-XJcop24UC2PlJbwXWzb7GNyKUXZgnVYocPCgsPQsom1oGlGFBBw\"\n}\n```\n7. Now render the requested claims and show them to users.\n\n8. Send claims back\n```bash\ncurl -H \"Content-Type: application/json\" -X POST -d '{\"user_pk\":\"f5bcf626df396d566f193a5684a2d6e7df724bae4e544930d300b205021c3369\",\"challenge\":\"eyJhbGciOiJFZDI1NTE5IiwidHlwIjoiSldUIn0.eyJyZXF1ZXN0ZWRDbGFpbXMiOlt7ImJpcnRoZGF5IjoiMTk5My0wOS0yNyIsImZ1bGxOYW1lIjoiQWxpY2UgWHUiLCJzc24iOiIxMjM0NTYiLCJ0eXBlIjoicHJvZmlsZSJ9XSwiZXhwIjoiMTU1MDAzNDk1OSIsImlhdCI6IjE1NTAwMzMxNTkiLCJpc3MiOiJkaWQ6YWJ0OnoxVWJMWGVXaE5YSkozRTE1YWJuVEQxcW40SmdMTEVTMnh0IiwibmJmIjoiMTU1MDAzMzE1OSJ9.9nQfpvCcM3ZbfTSggwjPXZ6NJJpZXN5iYjKMTEpkrtiMC_sqUuC0NYP4jXL9mgoGuXFCgO2ktmbi510I_7_VAg\"}' http://192.168.1.8:4000/api/auth/\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcblock%2Fforge-workshop","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farcblock%2Fforge-workshop","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farcblock%2Fforge-workshop/lists"}