pub struct KeyLoader;Expand description
Key loader for different sources
Implementations§
Source§impl KeyLoader
impl KeyLoader
Sourcepub fn signing_key_from_env(var_name: &str) -> Result<SigningKey, AuthError>
pub fn signing_key_from_env(var_name: &str) -> Result<SigningKey, AuthError>
Load signing key from environment variable (base64-encoded bytes)
Sourcepub fn verifying_key_from_env(var_name: &str) -> Result<VerifyingKey, AuthError>
pub fn verifying_key_from_env(var_name: &str) -> Result<VerifyingKey, AuthError>
Load verifying key from environment variable (base64-encoded bytes)
Sourcepub fn generate_and_save_keys(
signing_key_path: impl AsRef<Path>,
verifying_key_path: impl AsRef<Path>,
) -> Result<(SigningKey, VerifyingKey), AuthError>
pub fn generate_and_save_keys( signing_key_path: impl AsRef<Path>, verifying_key_path: impl AsRef<Path>, ) -> Result<(SigningKey, VerifyingKey), AuthError>
Generate and save a new key pair to files (base64-encoded)
Sourcepub fn signing_key_from_file(
path: impl AsRef<Path>,
) -> Result<SigningKey, AuthError>
pub fn signing_key_from_file( path: impl AsRef<Path>, ) -> Result<SigningKey, AuthError>
Load signing key from file (base64-encoded)
Sourcepub fn verifying_key_from_file(
path: impl AsRef<Path>,
) -> Result<VerifyingKey, AuthError>
pub fn verifying_key_from_file( path: impl AsRef<Path>, ) -> Result<VerifyingKey, AuthError>
Load verifying key from file (base64-encoded)
Auto Trait Implementations§
impl Freeze for KeyLoader
impl RefUnwindSafe for KeyLoader
impl Send for KeyLoader
impl Sync for KeyLoader
impl Unpin for KeyLoader
impl UnsafeUnpin for KeyLoader
impl UnwindSafe for KeyLoader
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