pub struct OAuthPrincipal {
pub company_id: Uuid,
pub user_id: Option<Uuid>,
pub permissions: Vec<String>,
}Expand description
The validated principal the composing host’s auth layer inserts into the
request extensions. Present ⇒ authenticated; the permission list carries
the module-scope grants (write:integrations, delete:integrations …).
company_id is the legacy tenancy twin (ADR-0029): the module’s own
tables are unfenced, so it never predicates a SQL statement here — it is
forwarded only to the credential STORE (which is still company-scoped) as
the store’s scope key on the complete / disconnect paths.
Fields§
§company_id: Uuid§user_id: Option<Uuid>§permissions: Vec<String>Trait Implementations§
Source§impl Clone for OAuthPrincipal
impl Clone for OAuthPrincipal
Auto Trait Implementations§
impl Freeze for OAuthPrincipal
impl RefUnwindSafe for OAuthPrincipal
impl Send for OAuthPrincipal
impl Sync for OAuthPrincipal
impl Unpin for OAuthPrincipal
impl UnsafeUnpin for OAuthPrincipal
impl UnwindSafe for OAuthPrincipal
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 more