pub struct ProxyOAuthConfig {
pub client_id: Option<String>,
pub scopes: Option<Vec<String>>,
pub authorization_server: Option<String>,
pub token_endpoint: Option<String>,
}Expand description
OAuth 2.1 client settings for a proxy upstream (auth_type = "oauth2").
Every field is optional so a minimal config just sets auth_type = "oauth2";
the missing pieces are resolved at devboy login time:
authorization_server— discovered from the upstream’s RFC 9728WWW-Authenticate: Bearer resource_metadata="…"challenge, then its RFC 8414 authorization-server metadata;client_id— obtained via RFC 7591 dynamic client registration and persisted back;scopes— default to the server’s advertised scopes.
Fields§
§client_id: Option<String>Registered OAuth client_id. Obtained via dynamic registration if unset.
scopes: Option<Vec<String>>Requested scopes. Falls back to the server’s advertised scopes if unset.
Authorization Server base URL. Discovered from the upstream’s RFC 9728
WWW-Authenticate challenge if unset.
token_endpoint: Option<String>Token endpoint, cached from discovery at devboy login time so the proxy
refreshes without re-running discovery on every startup.
Trait Implementations§
Source§impl Clone for ProxyOAuthConfig
impl Clone for ProxyOAuthConfig
Source§fn clone(&self) -> ProxyOAuthConfig
fn clone(&self) -> ProxyOAuthConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ProxyOAuthConfig
impl Debug for ProxyOAuthConfig
Source§impl Default for ProxyOAuthConfig
impl Default for ProxyOAuthConfig
Source§fn default() -> ProxyOAuthConfig
fn default() -> ProxyOAuthConfig
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ProxyOAuthConfig
impl<'de> Deserialize<'de> for ProxyOAuthConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ProxyOAuthConfig
impl RefUnwindSafe for ProxyOAuthConfig
impl Send for ProxyOAuthConfig
impl Sync for ProxyOAuthConfig
impl Unpin for ProxyOAuthConfig
impl UnsafeUnpin for ProxyOAuthConfig
impl UnwindSafe for ProxyOAuthConfig
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