forked from rarimo/decentralized-auth-svc
-
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 pull request #2 from rarimo/feat/pass-sync-v2
Feat/pass sync v2
- Loading branch information
Showing
57 changed files
with
4,548 additions
and
314 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,5 @@ | |
/docs/node_modules/ | ||
/docs/web_deploy/ | ||
|
||
config.*.yaml | ||
config.*.yaml | ||
*.*.yaml |
File renamed without changes.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
allOf: | ||
- $ref: '#/components/schemas/JoinProgramKey' | ||
- type: object | ||
x-go-is-request: true | ||
required: | ||
- attributes | ||
properties: | ||
attributes: | ||
required: | ||
- anonymous_id | ||
type: object | ||
properties: | ||
anonymous_id: | ||
type: string | ||
description: Unique identifier of the passport. | ||
example: "2bd3a2532096fee10a45a40e444a11b4d00a707f3459376087747de05996fbf5" |
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,13 @@ | ||
type: object | ||
required: | ||
- id | ||
- type | ||
properties: | ||
id: | ||
type: string | ||
description: Nullifier of the points owner | ||
example: "0x123...abc" | ||
pattern: '^0x[0-9a-fA-F]{64}$' | ||
type: | ||
type: string | ||
enum: [ join_program ] |
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,22 @@ | ||
allOf: | ||
- $ref: '#/components/schemas/VerifyPassportKey' | ||
- type: object | ||
x-go-is-request: true | ||
required: | ||
- attributes | ||
properties: | ||
attributes: | ||
required: | ||
- anonymous_id | ||
- proof | ||
type: object | ||
properties: | ||
anonymous_id: | ||
type: string | ||
description: Unique identifier of the passport. | ||
example: "2bd3a2532096fee10a45a40e444a11b4d00a707f3459376087747de05996fbf5" | ||
proof: | ||
type: object | ||
format: types.ZKProof | ||
description: | | ||
Query ZK passport verification proof. |
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,13 @@ | ||
type: object | ||
required: | ||
- id | ||
- type | ||
properties: | ||
id: | ||
type: string | ||
description: Nullifier of the points owner | ||
example: "0x123...abc" | ||
pattern: '^0x[0-9a-fA-F]{64}$' | ||
type: | ||
type: string | ||
enum: [ verify_passport ] |
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
40 changes: 40 additions & 0 deletions
40
docs/spec/paths/integrations@geo-auth-svc@v2@authorize.yaml
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,40 @@ | ||
post: | ||
tags: | ||
- Authorize | ||
summary: Authorize user V2 | ||
description: | | ||
Authorize user by ZKP and receive JWT. | ||
operationId: authorizeV2 | ||
requestBody: | ||
required: true | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: '#/components/schemas/Authorize' | ||
responses: | ||
200: | ||
description: OK | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: '#/components/schemas/Token' | ||
400: | ||
$ref: '#/components/responses/invalidParameter' | ||
401: | ||
description: Invalid proof | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/Errors' | ||
500: | ||
$ref: '#/components/responses/internalError' |
63 changes: 63 additions & 0 deletions
63
docs/spec/paths/integrations@geo-auth-svc@v2@joinprogram.yaml
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,63 @@ | ||
post: | ||
tags: | ||
- Passport verification | ||
summary: Join program | ||
security: | ||
- JWTAuth: [ ] | ||
description: Join rewards program | ||
operationId: joinProgram | ||
parameters: | ||
- in: header | ||
name: Signature | ||
description: Signature of the request | ||
required: true | ||
schema: | ||
type: string | ||
pattern: '^[a-f0-9]{64}$' | ||
requestBody: | ||
required: true | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: '#/components/schemas/JoinProgram' | ||
responses: | ||
200: | ||
description: Success | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: '#/components/schemas/Token' | ||
400: | ||
$ref: '#/components/responses/invalidParameter' | ||
401: | ||
$ref: '#/components/responses/invalidAuth' | ||
403: | ||
description: Incorrect signature | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/Errors' | ||
409: | ||
description: AnonymousID/Nullifier already used by another Nullifier/AnonymousID | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/Errors' | ||
429: | ||
description: Passport already verified. | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/Errors' | ||
500: | ||
$ref: '#/components/responses/internalError' |
65 changes: 65 additions & 0 deletions
65
docs/spec/paths/integrations@geo-auth-svc@v2@verifypassport.yaml
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,65 @@ | ||
post: | ||
tags: | ||
- Passport verification | ||
summary: Verify passport | ||
security: | ||
- JWTAuth: [ ] | ||
description: | | ||
Verify passport with ZKP. | ||
One passport can't be verified twice. | ||
operationId: verifyPassport | ||
parameters: | ||
- in: header | ||
name: Signature | ||
description: Signature of the request | ||
required: true | ||
schema: | ||
type: string | ||
pattern: '^[a-f0-9]{64}$' | ||
requestBody: | ||
required: true | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: '#/components/schemas/VerifyPassport' | ||
responses: | ||
200: | ||
description: Success | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
type: object | ||
required: | ||
- data | ||
properties: | ||
data: | ||
$ref: '#/components/schemas/Token' | ||
400: | ||
$ref: '#/components/responses/invalidParameter' | ||
401: | ||
$ref: '#/components/responses/invalidAuth' | ||
403: | ||
description: Incorrect signature | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/Errors' | ||
409: | ||
description: AnonymousID/Nullifier already used by another Nullifier/AnonymousID | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/Errors' | ||
429: | ||
description: Passport already proven. | ||
content: | ||
application/vnd.api+json: | ||
schema: | ||
$ref: '#/components/schemas/Errors' | ||
500: | ||
$ref: '#/components/responses/internalError' |
Oops, something went wrong.