pub struct CookieSessionResolver { /* private fields */ }Implementations§
Source§impl CookieSessionResolver
impl CookieSessionResolver
Sourcepub fn new(cookie_name: impl Into<String>, secret: impl AsRef<[u8]>) -> Self
pub fn new(cookie_name: impl Into<String>, secret: impl AsRef<[u8]>) -> Self
Build a resolver from a raw secret of any length. The secret is hashed to
a 32-byte key (cheers codecs require exactly 32 bytes) and used to
construct the default PasetoV4Codec. Pre-launch there are no legacy
tokens, so this key-derivation has no backward-compat path.
Sourcepub fn with_codec(
cookie_name: impl Into<String>,
codec: Box<dyn Codec + Send + Sync>,
) -> Self
pub fn with_codec( cookie_name: impl Into<String>, codec: Box<dyn Codec + Send + Sync>, ) -> Self
Inject any cheers_core::Codec — used by tests and forward-looking for
the asymmetric edge verifier (cheers R019). The codec owns the wire
format and crypto; the resolver only does cookie extraction + claim
mapping.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for CookieSessionResolver
impl !UnwindSafe for CookieSessionResolver
impl Freeze for CookieSessionResolver
impl Send for CookieSessionResolver
impl Sync for CookieSessionResolver
impl Unpin for CookieSessionResolver
impl UnsafeUnpin for CookieSessionResolver
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