-
Notifications
You must be signed in to change notification settings - Fork 9
Sim w/o global session #6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: simple
Are you sure you want to change the base?
Changes from all commits
e866789
fc9ae80
d660a7f
b68fe9d
bc9f565
51ccb5c
c7e453d
21e2c24
bcc5a9b
671edeb
38cf5a1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,13 +1,34 @@ | ||
| # EditorConfig is awesome: https://editorconfig.org | ||
|
|
||
| # top-most EditorConfig file | ||
| root = true | ||
| max_line_length = 100 | ||
|
|
||
|
|
||
| # Unix-style newlines with a newline ending every file | ||
| [*] | ||
| indent_style = space | ||
| indent_size = 4 | ||
| insert_final_newline = true | ||
| trim_trailing_whitespace = true | ||
| end_of_line = lf | ||
| charset = utf-8 | ||
| max_line_length = 88 | ||
|
|
||
| [*.{yml,yaml,json,js,css,html}] | ||
| [*.md] | ||
| trim_trailing_whitespace = false | ||
|
|
||
|
|
||
| # 2 space indentation | ||
| [*.{yml,yaml,css,html}] | ||
| indent_size = 2 | ||
|
|
||
|
|
||
| [*.py] | ||
| indent_style = space | ||
| indent_size = 4 | ||
|
|
||
| # Tab indentation (no size specified) | ||
| [Makefile] | ||
| indent_style = tab | ||
| tab_width = 4 | ||
|
|
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| WEB3_HTTPS_PROVIDER_URI=https://eth-mainnet.g.alchemy.com/v2/422IpViRAru0Uu1SANhySuOStpaIK3AG | ||
| ALCHEMY_API_KEY=xxx | ||
| QUART_APP=quart_sqlalchemy.sim.main:app |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,4 +21,4 @@ pytest-plugin-work | |
| old | ||
| examples/two/ | ||
| *.sqlite | ||
| *.db | ||
| *.db | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 3.7.13 | ||
| 3.12.2 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,159 @@ | ||
| # Simulation Docs | ||
|
|
||
| # initialize database | ||
| ```shell | ||
| quart db create | ||
| ``` | ||
| ``` | ||
| Initialized database schema for <QuartSQLAlchemy sqlite:///file:sim.db?cache=shared&uri=true> | ||
| ``` | ||
|
|
||
| # add first client to the database (Using CLI) | ||
| ```shell | ||
| quart auth add-client | ||
| ``` | ||
| ``` | ||
| Created client 2VolejRejNmG with public_api_key: 5f794cf72d0cef2dd008be2c0b7a632b | ||
| ``` | ||
|
|
||
| Use the `public_api_key` returned for the value of the `X-Public-API-Key` header when making API requests. | ||
|
|
||
|
|
||
| # Create new auth_user via api | ||
| ```shell | ||
| curl -X POST localhost:8081/api/auth_user/ \ | ||
| -H 'X-Public-API-Key: 5f794cf72d0cef2dd008be2c0b7a632b' \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations. Source: gitleaks
Comment on lines
+24
to
+25
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (curl-auth-header): Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource. Source: gitleaks |
||
| -H 'Content-Type: application/json' \ | ||
| --data '{"email": "[email protected]"}' | ||
| ``` | ||
| ```json | ||
| { | ||
| "data": { | ||
| "auth_user": { | ||
| "client_id": "2VolejRejNmG", | ||
| "current_session_token": "69ee9af5b9296a09f90be5b71c1dda38", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations. Source: gitleaks |
||
| "date_verified": 1681344793, | ||
| "delegated_identity_pool_id": null, | ||
| "delegated_user_id": null, | ||
| "email": "[email protected]", | ||
| "global_auth_user_id": null, | ||
| "id": "GWpmbk5ezJn4", | ||
| "is_admin": false, | ||
| "linked_primary_auth_user_id": null, | ||
| "phone_number": null, | ||
| "provenance": null, | ||
| "user_type": 2 | ||
| } | ||
| }, | ||
| "error_code": "", | ||
| "message": "", | ||
| "status": "" | ||
| } | ||
| ``` | ||
|
|
||
| Use the `current_session_token` returned for the value of `Authorization: Bearer {token}` header when making API Requests requiring a user. | ||
|
|
||
| # get AuthUser corresponding to provided bearer session token | ||
| ```shell | ||
| curl -X GET localhost:8081/api/auth_user/ \ | ||
| -H 'X-Public-API-Key: 5f794cf72d0cef2dd008be2c0b7a632b' \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations. Source: gitleaks
Comment on lines
+58
to
+59
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (curl-auth-header): Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource. Source: gitleaks |
||
| -H 'Authorization: Bearer 69ee9af5b9296a09f90be5b71c1dda38' \ | ||
| -H 'Content-Type: application/json' | ||
| ``` | ||
| ```json | ||
| { | ||
| "data": { | ||
| "client_id": "2VolejRejNmG", | ||
| "current_session_token": "69ee9af5b9296a09f90be5b71c1dda38", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations. Source: gitleaks |
||
| "date_verified": 1681344793, | ||
| "delegated_identity_pool_id": null, | ||
| "delegated_user_id": null, | ||
| "email": "[email protected]", | ||
| "global_auth_user_id": null, | ||
| "id": "GWpmbk5ezJn4", | ||
| "is_admin": false, | ||
| "linked_primary_auth_user_id": null, | ||
| "phone_number": null, | ||
| "provenance": null, | ||
| "user_type": 2 | ||
| }, | ||
| "error_code": "", | ||
| "message": "", | ||
| "status": "" | ||
| } | ||
| ``` | ||
|
|
||
|
|
||
| # AuthWallet Sync | ||
| ```shell | ||
| curl -X POST localhost:8081/api/auth_wallet/sync \ | ||
| -H 'X-Public-API-Key: 5f794cf72d0cef2dd008be2c0b7a632b' \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations. Source: gitleaks
Comment on lines
+89
to
+90
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (curl-auth-header): Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource. Source: gitleaks |
||
| -H 'Authorization: Bearer 69ee9af5b9296a09f90be5b71c1dda38' \ | ||
| -H 'Content-Type: application/json' \ | ||
| --data '{"public_address": "xxx", "encrypted_private_address": "xxx", "wallet_type": "ETH"}' | ||
| ``` | ||
| ```json | ||
| { | ||
| "data": { | ||
| "auth_user_id": "GWpmbk5ezJn4", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations. Source: gitleaks |
||
| "encrypted_private_address": "xxx", | ||
| "public_address": "xxx", | ||
| "wallet_id": "GWpmbk5ezJn4", | ||
| "wallet_type": "ETH" | ||
| }, | ||
| "error_code": "", | ||
| "message": "", | ||
| "status": "" | ||
| } | ||
| ``` | ||
|
|
||
| # get magic client corresponding to provided public api key | ||
| ```shell | ||
| curl -X GET localhost:8081/api/magic_client/ \ | ||
| -H 'X-Public-API-Key: 5f794cf72d0cef2dd008be2c0b7a632b' \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations. Source: gitleaks
Comment on lines
+112
to
+113
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (curl-auth-header): Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource. Source: gitleaks |
||
| -H 'Content-Type: application/json' | ||
| ``` | ||
| ```json | ||
| { | ||
| "data": { | ||
| "app_name": "My App", | ||
| "connect_interop": null, | ||
| "global_audience_enabled": false, | ||
| "id": "2VolejRejNmG", | ||
| "is_signing_modal_enabled": false, | ||
| "public_api_key": "5f794cf72d0cef2dd008be2c0b7a632b", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations. Source: gitleaks |
||
| "rate_limit_tier": null, | ||
| "secret_api_key": "c6ecbced505b35505751c862ed0fb10ffb623d24095019433e0d4d94e240e508" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations. Source: gitleaks |
||
| }, | ||
| "error_code": "", | ||
| "message": "", | ||
| "status": "" | ||
| } | ||
| ``` | ||
|
|
||
| # Create new magic client | ||
| ```shell | ||
| curl -X POST localhost:8081/api/magic_client/ \ | ||
| -H 'X-Public-API-Key: 5f794cf72d0cef2dd008be2c0b7a632b' \ | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations. Source: gitleaks
Comment on lines
+136
to
+137
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (curl-auth-header): Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource. Source: gitleaks |
||
| -H 'Content-Type: application/json' \ | ||
| --data '{"app_name": "New App"}' | ||
| ``` | ||
| ```json | ||
| { | ||
| "data": { | ||
| "magic_client": { | ||
| "app_name": "New App", | ||
| "connect_interop": null, | ||
| "global_audience_enabled": false, | ||
| "id": "GWpmbk5ezJn4", | ||
| "is_signing_modal_enabled": false, | ||
| "public_api_key": "fb7e0466e2e09387b93af7da49bb1386", | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations. Source: gitleaks |
||
| "rate_limit_tier": null, | ||
| "secret_api_key": "2ac56a6068d0d4b2ce911ba08401c7bf4acdb03db957550c260bd317c6c49a76" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations. Source: gitleaks |
||
| } | ||
| }, | ||
| "error_code": "", | ||
| "message": "", | ||
| "status": "" | ||
| } | ||
| ``` | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
security (generic-api-key): Detected a Generic API Key, potentially exposing access to various services and sensitive operations.
Source: gitleaks