pub struct Writer {
did: String,
token: Option<(ClientId, ScopeSet)>,
}Expand description
Who a repo write speaks for, as require_agent_token_or_dpop resolved
it.
What a write needs past the account is reached through
Writer::authorize alone, so a route cannot name the client to the
write path without first checking the token’s scope.
Fields§
§did: String§token: Option<(ClientId, ScopeSet)>The application whose OAuth token was presented, and the scope that
token was granted. None for the account’s own agent token.
Implementations§
Source§impl Writer
impl Writer
Checks every (collection, action) a request would write against
the token’s scope. The account’s own agent token is not scoped: what
it may write is policy’s question alone.
§Errors
The first write the token’s scope does not cover.
Checks one upload’s declared type against the token’s scope. How large a blob may be is policy’s and the server’s, not the grant’s.
§Errors
The upload, when the token’s scope does not cover it.
Checks acting at another service against the token’s scope: calling
lxm at aud, or taking a service-auth token for it. The account’s
own agent token acts anywhere.
§Errors
The call, when the token’s scope does not permit it; see
ScopeSet::permits_rpc.
Trait Implementations§
impl Eq for Writer
impl StructuralPartialEq for Writer
Auto Trait Implementations§
impl Freeze for Writer
impl RefUnwindSafe for Writer
impl Send for Writer
impl Sync for Writer
impl Unpin for Writer
impl UnsafeUnpin for Writer
impl UnwindSafe for Writer
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
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,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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>
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>
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