pub struct TokenExchangePolicyBuilder { /* private fields */ }Expand description
Builder for TokenExchangePolicy.
Implementations§
Source§impl TokenExchangePolicyBuilder
impl TokenExchangePolicyBuilder
Sourcepub fn subject_token_types(self, types: Vec<TokenType>) -> Self
pub fn subject_token_types(self, types: Vec<TokenType>) -> Self
Set the allowed subject token types.
Sourcepub fn actor_token_types(self, types: Vec<TokenType>) -> Self
pub fn actor_token_types(self, types: Vec<TokenType>) -> Self
Set the allowed actor token types.
Sourcepub fn scenarios(self, scenarios: Vec<ExchangeScenario>) -> Self
pub fn scenarios(self, scenarios: Vec<ExchangeScenario>) -> Self
Set the allowed exchange scenarios.
Sourcepub fn max_token_lifetime(self, lifetime: Duration) -> Self
pub fn max_token_lifetime(self, lifetime: Duration) -> Self
Set the maximum token lifetime for exchanged tokens.
Sourcepub fn require_actor_for_delegation(self, required: bool) -> Self
pub fn require_actor_for_delegation(self, required: bool) -> Self
Set whether actor tokens are required for delegation.
Sourcepub fn scope_map(self, source: impl Into<String>, targets: Vec<String>) -> Self
pub fn scope_map(self, source: impl Into<String>, targets: Vec<String>) -> Self
Add a scope mapping entry (source scope → allowed target scopes).
Sourcepub fn build(self) -> TokenExchangePolicy
pub fn build(self) -> TokenExchangePolicy
Build the TokenExchangePolicy.
Auto Trait Implementations§
impl Freeze for TokenExchangePolicyBuilder
impl RefUnwindSafe for TokenExchangePolicyBuilder
impl Send for TokenExchangePolicyBuilder
impl Sync for TokenExchangePolicyBuilder
impl Unpin for TokenExchangePolicyBuilder
impl UnsafeUnpin for TokenExchangePolicyBuilder
impl UnwindSafe for TokenExchangePolicyBuilder
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§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
Mutably borrows from an owned value. Read more
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