pub struct Config { /* private fields */ }Expand description
Public operator keys and the deployment’s canonical signing origin.
Implementations§
Source§impl Config
impl Config
Sourcepub fn parse(audience: &str, json: &str) -> Result<Self, ServerError>
pub fn parse(audience: &str, json: &str) -> Result<Self, ServerError>
Parse the §16.3 key list; empty lists disable the service.
§Errors
Invalid origins, duplicate keys or roles, malformed keys and bounds.
Sourcepub fn audience(&self) -> &str
pub fn audience(&self) -> &str
Canonical signing origin used by authentication and operator intents.
Sourcepub fn public_keys(&self) -> Vec<[u8; 32]>
pub fn public_keys(&self) -> Vec<[u8; 32]>
Configured public keys for checking other credential domains.
Sourcepub fn check_separation(&self, other: &[[u8; 32]]) -> Result<(), ServerError>
pub fn check_separation(&self, other: &[[u8; 32]]) -> Result<(), ServerError>
Reject sharing an admin key with another credential role.
§Errors
A configured admin public key occurs in other.
Trait Implementations§
impl Eq for Config
impl StructuralPartialEq for Config
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
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