Enum noosphere_core::authority::Authorization
source · pub enum Authorization {
Ucan(Ucan),
Cid(Cid),
}Expand description
An Authorization is a wrapper around something that can be resolved into a Ucan. Typically this is a Cid, but it may also be something like a Ucan itself, or a UcanIpld, or a Jwt. We don’t want to deal with each of these heterogenous types separately, so we move them around as an Authorization instead. TODO(ucan-wg/rs-ucan#32): Maybe swap this out is we get a substantially similar construct to land in rs-ucan
Variants§
Ucan(Ucan)
A fully instantiated UCAN
Cid(Cid)
A CID that refers to a UCAN that may be looked up in storage at the point of invocation
Implementations§
source§impl Authorization
impl Authorization
pub async fn resolve_ucan<S: UcanJwtStore>(&self, store: &S) -> Result<Ucan>
Trait Implementations§
source§impl Clone for Authorization
impl Clone for Authorization
source§fn clone(&self) -> Authorization
fn clone(&self) -> Authorization
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read more