pub struct Authority { /* private fields */ }Expand description
Shared symmetric trust realm, independent of hostnames and protocols. Every key holder can mint tokens; provision keys only to equally trusted services.
Implementations§
Source§impl Authority
impl Authority
pub fn new( realm: impl Into<String>, issuer: impl Into<String>, keyring: Keyring, ) -> Result<Self>
Sourcepub fn issue(&self, claims: Claims) -> Result<Token>
pub fn issue(&self, claims: Claims) -> Result<Token>
Caller must authorize subject and capabilities before issuance.
Sourcepub fn issue_session(&self, claims: Claims, session: &Session) -> Result<Token>
pub fn issue_session(&self, claims: Claims, session: &Session) -> Result<Token>
Issue a credential bound to shared session state. The caller authorizes audience/capability delegation; validation must use the FleetAuth hook.
Sourcepub fn validator(&self, validation: Validation) -> Validator<'_>
pub fn validator(&self, validation: Validation) -> Validator<'_>
Build once per trusted recipient/use policy and reuse across requests.
Auto Trait Implementations§
impl Freeze for Authority
impl RefUnwindSafe for Authority
impl Send for Authority
impl Sync for Authority
impl Unpin for Authority
impl UnsafeUnpin for Authority
impl UnwindSafe for Authority
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more