Struct biscuit_auth::UnverifiedBiscuit
source ·
[−]pub struct UnverifiedBiscuit { /* private fields */ }Expand description
A token that was parsed without cryptographic signature verification
Use this if you want to attenuate or print the content of a token without verifying it.
It can be converted to a Biscuit using UnverifiedBiscuit::check_signature, and then used for authorization
Implementations
deserializes a token from raw bytes
deserializes a token from base64
checks the signature of the token and convert it to a Biscuit for authorization
adds a new block to the token
since the public key is integrated into the token, the keypair can be discarded right after calling this function
serializes the token and encode it to a (URL safe) base64 string
creates a new block builder
deserializes from raw bytes with a custom symbol table
pub fn from_base64_with_symbols<T>(
slice: T,
symbols: SymbolTable
) -> Result<Self, Token> where
T: AsRef<[u8]>,
pub fn from_base64_with_symbols<T>(
slice: T,
symbols: SymbolTable
) -> Result<Self, Token> where
T: AsRef<[u8]>,
deserializes a token from base64 with a custom symbol table
pub fn append_with_keypair(
&self,
keypair: &KeyPair,
block_builder: BlockBuilder
) -> Result<Self, Token>
pub fn append_with_keypair(
&self,
keypair: &KeyPair,
block_builder: BlockBuilder
) -> Result<Self, Token>
adds a new block to the token
since the public key is integrated into the token, the keypair can be discarded right after calling this function
returns a list of revocation identifiers for each block, in order
if a token is generated with the same keys and the same content, those identifiers will stay the same
returns the number of blocks (at least 1)
prints the content of a block as Datalog source code
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for UnverifiedBiscuit
impl Send for UnverifiedBiscuit
impl Sync for UnverifiedBiscuit
impl Unpin for UnverifiedBiscuit
impl UnwindSafe for UnverifiedBiscuit
Blanket Implementations
Mutably borrows from an owned value. Read more
