-
Notifications
You must be signed in to change notification settings - Fork 636
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
lex: add more identity helpers (#2264)
* lex: add more identity helpers * lex: update identity helpers * make fmt * fix typo in 'id' * add errors; add resolveDid; more descriptions * lint * fix 'identifier' field names * identity: rename def; DID deactivation as error, not flag; require handle+doc * update again, to 'identityInfo' * codegen * changeset
- Loading branch information
Showing
34 changed files
with
1,806 additions
and
12 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@atproto/api": patch | ||
--- | ||
|
||
new com.atproto.identity endpoints: resolveDid, resolveIdentity, refreshIdentity |
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 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "com.atproto.identity.defs", | ||
"defs": { | ||
"identityInfo": { | ||
"type": "object", | ||
"required": ["did", "handle", "didDoc"], | ||
"properties": { | ||
"did": { "type": "string", "format": "did" }, | ||
"handle": { | ||
"type": "string", | ||
"format": "handle", | ||
"description": "The validated handle of the account; or 'handle.invalid' if the handle did not bi-directionally match the DID document." | ||
}, | ||
"didDoc": { | ||
"type": "unknown", | ||
"description": "The complete DID document for the identity." | ||
} | ||
} | ||
} | ||
} | ||
} |
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,44 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "com.atproto.identity.refreshIdentity", | ||
"defs": { | ||
"main": { | ||
"type": "procedure", | ||
"description": "Request that the server re-resolve an identity (DID and handle). The server may ignore this request, or require authentication, depending on the role, implementation, and policy of the server.", | ||
"input": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["identifier"], | ||
"properties": { | ||
"identifier": { | ||
"type": "string", | ||
"format": "at-identifier" | ||
} | ||
} | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "ref", | ||
"ref": "com.atproto.identity.defs#identityInfo" | ||
} | ||
}, | ||
"errors": [ | ||
{ | ||
"name": "HandleNotFound", | ||
"description": "The resolution process confirmed that the handle does not resolve to any DID." | ||
}, | ||
{ | ||
"name": "DidNotFound", | ||
"description": "The DID resolution process confirmed that there is no current DID." | ||
}, | ||
{ | ||
"name": "DidDeactivated", | ||
"description": "The DID previously existed, but has been deactivated." | ||
} | ||
] | ||
} | ||
} | ||
} |
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,44 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "com.atproto.identity.resolveDid", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Resolves DID to DID document. Does not bi-directionally verify handle.", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["did"], | ||
"properties": { | ||
"did": { | ||
"type": "string", | ||
"format": "did", | ||
"description": "DID to resolve." | ||
} | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "object", | ||
"required": ["didDoc"], | ||
"properties": { | ||
"didDoc": { | ||
"type": "unknown", | ||
"description": "The complete DID document for the identity." | ||
} | ||
} | ||
} | ||
}, | ||
"errors": [ | ||
{ | ||
"name": "DidNotFound", | ||
"description": "The DID resolution process confirmed that there is no current DID." | ||
}, | ||
{ | ||
"name": "DidDeactivated", | ||
"description": "The DID previously existed, but has been deactivated." | ||
} | ||
] | ||
} | ||
} | ||
} |
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,42 @@ | ||
{ | ||
"lexicon": 1, | ||
"id": "com.atproto.identity.resolveIdentity", | ||
"defs": { | ||
"main": { | ||
"type": "query", | ||
"description": "Resolves an identity (DID or Handle) to a full identity (DID document and verified handle).", | ||
"parameters": { | ||
"type": "params", | ||
"required": ["identifier"], | ||
"properties": { | ||
"identifier": { | ||
"type": "string", | ||
"format": "at-identifier", | ||
"description": "Handle or DID to resolve." | ||
} | ||
} | ||
}, | ||
"output": { | ||
"encoding": "application/json", | ||
"schema": { | ||
"type": "ref", | ||
"ref": "com.atproto.identity.defs#identityInfo" | ||
} | ||
}, | ||
"errors": [ | ||
{ | ||
"name": "HandleNotFound", | ||
"description": "The resolution process confirmed that the handle does not resolve to any DID." | ||
}, | ||
{ | ||
"name": "DidNotFound", | ||
"description": "The DID resolution process confirmed that there is no current DID." | ||
}, | ||
{ | ||
"name": "DidDeactivated", | ||
"description": "The DID previously existed, but has been deactivated." | ||
} | ||
] | ||
} | ||
} | ||
} |
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
Oops, something went wrong.