-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support linking multiple auth principals to an OC account (#5852)
- Loading branch information
Showing
28 changed files
with
662 additions
and
21 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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
21 changes: 21 additions & 0 deletions
21
backend/canisters/identity/api/src/updates/approve_identity_link.rs
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,21 @@ | ||
use crate::SignedDelegation; | ||
use candid::{CandidType, Deserialize, Principal}; | ||
use serde::Serialize; | ||
|
||
#[derive(CandidType, Serialize, Deserialize, Debug)] | ||
pub struct Args { | ||
pub delegation: SignedDelegation, | ||
#[serde(with = "serde_bytes")] | ||
pub public_key: Vec<u8>, | ||
pub link_initiated_by: Principal, | ||
} | ||
|
||
#[derive(CandidType, Serialize, Deserialize, Debug)] | ||
pub enum Response { | ||
Success, | ||
CallerNotRecognised, | ||
LinkRequestNotFound, | ||
MalformedSignature(String), | ||
InvalidSignature, | ||
DelegationTooOld, | ||
} |
17 changes: 17 additions & 0 deletions
17
backend/canisters/identity/api/src/updates/initiate_identity_link.rs
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,17 @@ | ||
use candid::{CandidType, Deserialize, Principal}; | ||
use serde::Serialize; | ||
|
||
#[derive(CandidType, Serialize, Deserialize, Debug)] | ||
pub struct Args { | ||
#[serde(with = "serde_bytes")] | ||
pub public_key: Vec<u8>, | ||
pub link_to_principal: Principal, | ||
} | ||
|
||
#[derive(CandidType, Serialize, Deserialize, Debug)] | ||
pub enum Response { | ||
Success, | ||
AlreadyRegistered, | ||
TargetUserNotFound, | ||
PublicKeyInvalid(String), | ||
} |
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 |
---|---|---|
@@ -1,4 +1,6 @@ | ||
pub mod approve_identity_link; | ||
pub mod c2c_set_user_ids; | ||
pub mod create_identity; | ||
pub mod generate_challenge; | ||
pub mod initiate_identity_link; | ||
pub mod prepare_delegation; |
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.