pub fn create_multi_party_biscuit(
subject: String,
resource: String,
operation: String,
key: KeyPair,
multi_party_nodes: &Vec<ServiceNode>,
) -> Result<Vec<u8>, Box<dyn Error>>Expand description
Creates a new biscuit token with multi-party attestations.
This function creates a token that grants access to the specified resource for the given subject, includes attestations for each multi-party node in the chain. The token will be valid for 5 minutes by default.
The key difference between a multi-party biscuit and a service chain biscuit is that a multi-party biscuit is not valid until it has been attested by all the parties.
§Arguments
subject- The subject (user) identifierresource- The resource identifier to grant access tooperation- The operation to grant access tokey- The key pair used to sign the tokenmulti_party_nodes- Vector of multi-party nodes that will attest to the token
§Returns
Ok(Vec<u8>)- The binary token data if successfulErr(Box<dyn Error>)- If token creation fails