pub struct AuthServiceImpl { /* private fields */ }Implementations§
Source§impl AuthServiceImpl
impl AuthServiceImpl
Sourcepub async fn new(email_sender: Arc<dyn EmailSender>) -> Self
pub async fn new(email_sender: Arc<dyn EmailSender>) -> Self
Creates a new AuthServiceImpl with the provided email_sender.
§Panics
- If
AETHERIS_ENVis set to “production” butAETHERIS_AUTH_BYPASSis enabled. - If
AETHERIS_ENVis set to “production” butSESSION_PASETO_KEYorTRANSPORT_PASETO_KEYare missing. - If the provided PASETO keys are not exactly 32 bytes long.
Validates a session by JTI, checking for revocation and enforcing 1h sliding idle window.
§Performance
if tick is provided, activity updates are coalesced to once per 60 ticks (~1s)
to reduce write-lock contention on the session map.
Trait Implementations§
Source§impl AuthService for AuthServiceImpl
impl AuthService for AuthServiceImpl
Source§impl AuthService for AuthServiceImpl
impl AuthService for AuthServiceImpl
Source§fn request_otp<'life0, 'async_trait>(
&'life0 self,
request: Request<OtpRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<OtpRequestAck>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn request_otp<'life0, 'async_trait>(
&'life0 self,
request: Request<OtpRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<OtpRequestAck>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
── Email OTP path ──
Source§fn login<'life0, 'async_trait>(
&'life0 self,
request: Request<LoginRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<LoginResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn login<'life0, 'async_trait>(
&'life0 self,
request: Request<LoginRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<LoginResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
── Unified Login path ──
Source§fn logout<'life0, 'async_trait>(
&'life0 self,
request: Request<LogoutRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<LogoutResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn logout<'life0, 'async_trait>(
&'life0 self,
request: Request<LogoutRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<LogoutResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
── Session lifecycle (unchanged) ──
fn refresh_token<'life0, 'async_trait>(
&'life0 self,
request: Request<RefreshRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<RefreshResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn issue_connect_token<'life0, 'async_trait>(
&'life0 self,
request: Request<ConnectTokenRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<ConnectTokenResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn create_google_login_nonce<'life0, 'async_trait>(
&'life0 self,
_request: Request<GoogleLoginNonceRequest>,
) -> Pin<Box<dyn Future<Output = Result<Response<GoogleLoginNonceResponse>, Status>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§impl AuthSessionVerifier for AuthServiceImpl
impl AuthSessionVerifier for AuthServiceImpl
Source§fn verify_session(
&self,
token: &str,
tick: Option<u64>,
) -> Result<VerifiedSession, AuthError>
fn verify_session( &self, token: &str, tick: Option<u64>, ) -> Result<VerifiedSession, AuthError>
Verifies a session token and returns the verified session details.
Checks if a session JTI is still authorized.
Source§impl Clone for AuthServiceImpl
impl Clone for AuthServiceImpl
Source§fn clone(&self) -> AuthServiceImpl
fn clone(&self) -> AuthServiceImpl
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for AuthServiceImpl
impl !RefUnwindSafe for AuthServiceImpl
impl Send for AuthServiceImpl
impl Sync for AuthServiceImpl
impl Unpin for AuthServiceImpl
impl UnsafeUnpin for AuthServiceImpl
impl !UnwindSafe for AuthServiceImpl
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Converts
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Converts
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Converts
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Converts
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
Source§fn into_result(self) -> Result<T, RunSystemError>
fn into_result(self) -> Result<T, RunSystemError>
Converts this type into the system output type.
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> TypeData for T
impl<T> TypeData for T
Source§fn clone_type_data(&self) -> Box<dyn TypeData>
fn clone_type_data(&self) -> Box<dyn TypeData>
Creates a type-erased clone of this value.