pub struct Gate {
pub provider: String,
pub public_paths: Option<Vec<GatePath>>,
pub session_ttl_secs: Option<u64>,
pub base_path: Option<String>,
pub cookie_name: Option<String>,
pub forward_identity: Option<bool>,
}Expand description
A sign-in gate that inherits its identity from a namespace auth provider.
Every field but the provider is optional; one left None keeps what the
deployment’s gate already has.
Fields§
§provider: StringThe auth provider’s name in the deployment’s namespace: heyo,
google, or one declared by hand.
public_paths: Option<Vec<GatePath>>Path prefixes that skip sign-in, and what app-lb requires on them instead. Replaces the list when set.
session_ttl_secs: Option<u64>How long a session lasts, in seconds.
base_path: Option<String>Where the sign-in endpoints live under the deployment’s hostname.
Default /__applb/auth; set it under the deployment’s path prefix if it
is routed by one.
forward_identity: Option<bool>Send the signed-in identity upstream as x-auth-request-* headers.
On by default.
Implementations§
Source§impl Gate
impl Gate
pub fn provider(name: impl Into<String>) -> Self
Sourcepub fn public(self, prefix: impl Into<String>) -> Self
pub fn public(self, prefix: impl Into<String>) -> Self
Let anyone reach paths under prefix without signing in.
Sourcepub fn path(self, prefix: impl Into<String>, scope: impl Into<String>) -> Self
pub fn path(self, prefix: impl Into<String>, scope: impl Into<String>) -> Self
Paths under prefix skip sign-in but need an app-token of scope.
pub fn session_ttl_secs(self, secs: u64) -> Self
pub fn base_path(self, path: impl Into<String>) -> Self
pub fn forward_identity(self, on: bool) -> Self
Trait Implementations§
impl Eq for Gate
impl StructuralPartialEq for Gate
Auto Trait Implementations§
impl Freeze for Gate
impl RefUnwindSafe for Gate
impl Send for Gate
impl Sync for Gate
impl Unpin for Gate
impl UnsafeUnpin for Gate
impl UnwindSafe for Gate
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.