Skip to main content

OAuthProviderOptions

Struct OAuthProviderOptions 

Source
pub struct OAuthProviderOptions {
Show 56 fields pub scopes: Vec<String>, pub client_registration_default_scopes: Vec<String>, pub client_registration_allowed_scopes: Vec<String>, pub grant_types: Vec<GrantType>, pub login_page: String, pub consent_page: String, pub signup_page: Option<String>, pub select_account_page: Option<String>, pub post_login_page: Option<String>, pub signup_redirect: Option<PromptRedirectResolver>, pub select_account_redirect: Option<PromptRedirectResolver>, pub post_login_redirect: Option<PromptRedirectResolver>, pub signup_should_redirect: Option<PromptShouldRedirectResolver>, pub select_account_should_redirect: Option<PromptShouldRedirectResolver>, pub post_login_should_redirect: Option<PromptShouldRedirectResolver>, pub consent_reference_id: Option<ClientReferenceResolver>, pub code_expires_in: u64, pub access_token_expires_in: u64, pub m2m_access_token_expires_in: u64, pub id_token_expires_in: u64, pub refresh_token_expires_in: u64, pub client_credential_grant_default_scopes: Vec<String>, pub scope_expirations: BTreeMap<String, u64>, pub client_registration_client_secret_expiration: Option<u64>, pub allow_unauthenticated_client_registration: bool, pub allow_dynamic_client_registration: bool, pub allow_public_client_prelogin: bool, pub cached_trusted_clients: BTreeSet<String>, pub client_reference: Option<ClientReferenceResolver>, pub client_privileges: Option<ClientPrivilegesResolver>, pub custom_access_token_claims: Option<CustomAccessTokenClaimsResolver>, pub custom_id_token_claims: Option<CustomIdTokenClaimsResolver>, pub custom_token_response_fields: Option<CustomTokenResponseFieldsResolver>, pub custom_userinfo_claims: Option<CustomUserInfoClaimsResolver>, pub request_uri_resolver: Option<RequestUriResolver>, pub prefixes: OAuthTokenPrefixes, pub generate_client_id: Option<StringGeneratorResolver>, pub generate_client_secret: Option<StringGeneratorResolver>, pub generate_opaque_access_token: Option<StringGeneratorResolver>, pub generate_refresh_token: Option<StringGeneratorResolver>, pub format_refresh_token: Option<RefreshTokenFormatter>, pub disable_jwt_plugin: bool, pub store_client_secret: SecretStorage, pub store_tokens: SecretStorage, pub hash_client_secret: Option<ClientSecretHashResolver>, pub verify_client_secret_hash: Option<ClientSecretVerifyResolver>, pub hash_token: Option<TokenHashResolver>, pub pairwise_secret: Option<String>, pub advertised_scopes_supported: Vec<String>, pub advertised_claims_supported: Vec<String>, pub advertised_jwks_uri: Option<String>, pub advertised_id_token_signing_algorithms: Vec<String>, pub jwks_path: String, pub valid_audiences: Vec<String>, pub rate_limits: OAuthProviderRateLimits, pub mcp: Option<McpOptions>,
}
Expand description

User-facing OAuth provider plugin options.

Fields§

§scopes: Vec<String>§client_registration_default_scopes: Vec<String>§client_registration_allowed_scopes: Vec<String>§grant_types: Vec<GrantType>§login_page: String§consent_page: String§signup_page: Option<String>§select_account_page: Option<String>§post_login_page: Option<String>§signup_redirect: Option<PromptRedirectResolver>§select_account_redirect: Option<PromptRedirectResolver>§post_login_redirect: Option<PromptRedirectResolver>§signup_should_redirect: Option<PromptShouldRedirectResolver>§select_account_should_redirect: Option<PromptShouldRedirectResolver>§post_login_should_redirect: Option<PromptShouldRedirectResolver>§consent_reference_id: Option<ClientReferenceResolver>§code_expires_in: u64§access_token_expires_in: u64§m2m_access_token_expires_in: u64§id_token_expires_in: u64§refresh_token_expires_in: u64§client_credential_grant_default_scopes: Vec<String>§scope_expirations: BTreeMap<String, u64>§client_registration_client_secret_expiration: Option<u64>§allow_unauthenticated_client_registration: bool§allow_dynamic_client_registration: bool§allow_public_client_prelogin: bool§cached_trusted_clients: BTreeSet<String>§client_reference: Option<ClientReferenceResolver>§client_privileges: Option<ClientPrivilegesResolver>§custom_access_token_claims: Option<CustomAccessTokenClaimsResolver>§custom_id_token_claims: Option<CustomIdTokenClaimsResolver>§custom_token_response_fields: Option<CustomTokenResponseFieldsResolver>§custom_userinfo_claims: Option<CustomUserInfoClaimsResolver>§request_uri_resolver: Option<RequestUriResolver>§prefixes: OAuthTokenPrefixes§generate_client_id: Option<StringGeneratorResolver>§generate_client_secret: Option<StringGeneratorResolver>§generate_opaque_access_token: Option<StringGeneratorResolver>§generate_refresh_token: Option<StringGeneratorResolver>§format_refresh_token: Option<RefreshTokenFormatter>§disable_jwt_plugin: bool§store_client_secret: SecretStorage§store_tokens: SecretStorage§hash_client_secret: Option<ClientSecretHashResolver>§verify_client_secret_hash: Option<ClientSecretVerifyResolver>§hash_token: Option<TokenHashResolver>§pairwise_secret: Option<String>§advertised_scopes_supported: Vec<String>§advertised_claims_supported: Vec<String>§advertised_jwks_uri: Option<String>§advertised_id_token_signing_algorithms: Vec<String>§jwks_path: String§valid_audiences: Vec<String>§rate_limits: OAuthProviderRateLimits§mcp: Option<McpOptions>

Enable MCP protected-resource metadata.

Implementations§

Source§

impl OAuthProviderOptions

Source

pub fn with_external_jwt(self) -> Self

Disable JWT integration (opaque tokens / HS256 id_tokens without the jwt plugin).

Trait Implementations§

Source§

impl Clone for OAuthProviderOptions

Source§

fn clone(&self) -> OAuthProviderOptions

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Default for OAuthProviderOptions

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
where ST: ?Sized, DT: ?Sized,

Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Sized + Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Read<Exclusive, BecauseExclusive> for T
where T: ?Sized,

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more