pub struct Scope {
pub id: String,
pub namespace: String,
pub parent: String,
pub display_name: String,
pub origins: Vec<String>,
pub clients: Vec<ScopeClient>,
pub observers: Vec<String>,
pub created_at: i64,
pub version: u64,
pub state: i32,
pub return_paths: Vec<String>,
}Fields§
§id: String[a-z][a-z0-9_]{0,31}; main for the root.
namespace: StringThe tenant namespace its permissions live in. Equal to id for every scope but
main, which has none (empty).
parent: StringEmpty for main; main for every other scope today.
display_name: StringPlain text, at most 80 bytes.
origins: Vec<String>The https origins of the scope’s hosts (<https://invest.evinvest.ltd>), exactly as a
browser sends Origin: https only; the host ends in .evinvest.ltd (the bare
evinvest.ltd is PUBLIC_ORIGIN, never a scope’s); port 1-65535 and only when
non-default; no path, no trailing slash, no wildcard, never null. Compared byte for
byte; the answer’s Access-Control-Allow-Origin is exactly the matched origin, with
Vary: Origin.
While the scope is ACTIVE or FROZEN (never once CLOSED) they widen CORS on a fixed
list of sign-in routes only — /auth/code/request, /auth/code/verify,
/auth/password/signin, /auth/password/signup, /auth/password/signup/confirm,
/auth/password/signup/resend, /auth/passkey/signin/* and GET /auth/session, which
answers them {authenticated, user, permissions} and never a token — and on the
public, credential-less GET /auth/mfe/*. Everything that acts on an open session or
reads the account (/auth/email/verify/*, /auth/password/set,
/auth/passkey/register|remove, sessions, username, methods, /auth/me,
/auth/notifications/settings*, logout, /kyc/*) accepts PUBLIC_ORIGIN alone; a scope
host confirms a password sign-up with the ticket that sign-up handed it. The registry
is re-read at most 30 s apart, so a CLOSED scope or a removed origin stops being
answered within that. An absolute OAuth returnTo must be one of these origins plus a
path from return_paths, or /auth/login answers 400.
clients: Vec<ScopeClient>The relying-party clients signing people in for this scope. A scope may have none
(main is first-party) or several.
observers: Vec<String>The clients that may read THIS scope’s events and its users’ lifecycle besides its
own: a direction that runs resources of other scopes (invest runs allocations for
sa) is named on each scope it serves. Client ids. READ access to this plane’s
streams and nothing else: an observer holds no right on the money plane, where a
service’s grants are banking’s own configuration.
created_at: i64Unix SECONDS.
version: u64Bumped on every change to anything in this message; SCOPE_CHANGED carries it.
state: i32§return_paths: Vec<String>The paths an OAuth returnTo may name on origins (/cabinet, /auth/callback),
each starting with a single /, matched exactly — no prefix, no query.
Implementations§
Source§impl Scope
impl Scope
Sourcepub fn state(&self) -> ScopeState
pub fn state(&self) -> ScopeState
Returns the enum value of state, or the default if the field is set to an invalid enum value.
Sourcepub fn set_state(&mut self, value: ScopeState)
pub fn set_state(&mut self, value: ScopeState)
Sets state to the provided enum value.
Trait Implementations§
Source§impl Message for Scope
impl Message for Scope
Source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
Source§fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8> ⓘwhere
Self: Sized,
Source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
Source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self. Read moreSource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self.impl StructuralPartialEq for Scope
Auto Trait Implementations§
impl Freeze for Scope
impl RefUnwindSafe for Scope
impl Send for Scope
impl Sync for Scope
impl Unpin for Scope
impl UnsafeUnpin for Scope
impl UnwindSafe for Scope
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request