pub struct OAuthProxyConfigBuilder { /* private fields */ }Expand description
Builder for OAuthProxyConfig.
Obtain via OAuthProxyConfig::builder. See the type-level docs on
OAuthProxyConfig and in particular the security caveats on
OAuthProxyConfig::expose_admin_endpoints.
Implementations§
Source§impl OAuthProxyConfigBuilder
impl OAuthProxyConfigBuilder
Sourcepub fn client_secret(self, secret: SecretString) -> Self
pub fn client_secret(self, secret: SecretString) -> Self
Set the upstream OAuth client secret. Omit for public clients.
Sourcepub fn introspection_url(self, url: impl Into<String>) -> Self
pub fn introspection_url(self, url: impl Into<String>) -> Self
Configure the upstream RFC 7662 introspection endpoint. Only
advertised and reachable when
Self::expose_admin_endpoints is also set to true.
Sourcepub fn revocation_url(self, url: impl Into<String>) -> Self
pub fn revocation_url(self, url: impl Into<String>) -> Self
Configure the upstream RFC 7009 revocation endpoint. Only
advertised and reachable when
Self::expose_admin_endpoints is also set to true.
Sourcepub const fn expose_admin_endpoints(self, expose: bool) -> Self
pub const fn expose_admin_endpoints(self, expose: bool) -> Self
Opt in to exposing the /introspect and /revoke admin
endpoints and advertising them in the authorization-server
metadata document.
Security: see the field-level documentation on
OAuthProxyConfig::expose_admin_endpoints for the caveats
before enabling this.
Sourcepub const fn require_auth_on_admin_endpoints(self, require: bool) -> Self
pub const fn require_auth_on_admin_endpoints(self, require: bool) -> Self
Require the normal authentication middleware on /introspect and
/revoke.
Sourcepub fn build(self) -> OAuthProxyConfig
pub fn build(self) -> OAuthProxyConfig
Finalise the builder and return the OAuthProxyConfig.
Trait Implementations§
Source§impl Clone for OAuthProxyConfigBuilder
impl Clone for OAuthProxyConfigBuilder
Source§fn clone(&self) -> OAuthProxyConfigBuilder
fn clone(&self) -> OAuthProxyConfigBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more