pub struct EncoreAuth { /* private fields */ }Implementations§
Source§impl EncoreAuth
impl EncoreAuth
Sourcepub fn new(app_slug: String, env_name: String, keys: Vec<EncoreAuthKey>) -> Self
pub fn new(app_slug: String, env_name: String, keys: Vec<EncoreAuthKey>) -> Self
Signs calls as the environment env_name of the app app_slug, and
accepts a call signed with any of keys whatever app and environment
it was signed for, as the old runtimes do.
Sourcepub fn for_environment(
app_slug: String,
env_name: String,
keys: Vec<EncoreAuthKey>,
) -> Self
pub fn for_environment( app_slug: String, env_name: String, keys: Vec<EncoreAuthKey>, ) -> Self
Signs calls as the environment env_name of the app app_slug, and
accepts only calls signed for it, so a key shared between environments
does not let a call signed in one verify in another.
Trait Implementations§
Source§impl Debug for EncoreAuth
impl Debug for EncoreAuth
Source§impl ServiceAuthMethod for EncoreAuth
impl ServiceAuthMethod for EncoreAuth
fn name(&self) -> &'static str
fn sign(&self, headers: &mut dyn MetaMapMut, now: SystemTime) -> Result<()>
fn verify( &self, headers: &dyn MetaMap, now: SystemTime, ) -> Result<(), VerifyError>
Auto Trait Implementations§
impl !RefUnwindSafe for EncoreAuth
impl !UnwindSafe for EncoreAuth
impl Forget for EncoreAuth
impl Freeze for EncoreAuth
impl Move for EncoreAuth
impl Send for EncoreAuth
impl Sync for EncoreAuth
impl Unpin for EncoreAuth
impl UnsafeUnpin for EncoreAuth
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