pub trait AccessTokenSubstrateConfigSource {
// Required methods
fn resource_server_config(&self) -> &OAuthResourceServerConfig;
fn token_propagation(&self) -> &TokenPropagation;
// Provided methods
fn resolve_resource_server(
&self,
shared: &OidcSharedConfig,
) -> Result<OAuthResourceServerConfig, BackendConfigError> { ... }
fn resolve_all(
&self,
shared: Option<&OidcSharedConfig>,
) -> Result<ResolvedAccessTokenSubstrateConfig, BackendConfigError> { ... }
}Expand description
Trait for types that supply access-token substrate configuration components.
Mirrors BackendOidcModeConfigSource for the substrate layer.
Implementors expose component-config accessors and gain default resolve_*
helper methods that apply [oidc] shared defaults and validate each
component.
Required Methods§
Sourcefn resource_server_config(&self) -> &OAuthResourceServerConfig
fn resource_server_config(&self) -> &OAuthResourceServerConfig
Access the raw [oauth_resource_server] config block.
Sourcefn token_propagation(&self) -> &TokenPropagation
fn token_propagation(&self) -> &TokenPropagation
Access the token propagation capability axis.
Provided Methods§
Sourcefn resolve_resource_server(
&self,
shared: &OidcSharedConfig,
) -> Result<OAuthResourceServerConfig, BackendConfigError>
fn resolve_resource_server( &self, shared: &OidcSharedConfig, ) -> Result<OAuthResourceServerConfig, BackendConfigError>
Apply OIDC shared defaults to the resource-server config and validate.
Delegates to OAuthResourceServerConfig::resolve_config which handles
well_known_url, client_id, client_secret inheritance from the
[oidc] shared block.
Sourcefn resolve_all(
&self,
shared: Option<&OidcSharedConfig>,
) -> Result<ResolvedAccessTokenSubstrateConfig, BackendConfigError>
fn resolve_all( &self, shared: Option<&OidcSharedConfig>, ) -> Result<ResolvedAccessTokenSubstrateConfig, BackendConfigError>
Recommended entry point. Resolve all substrate sub-configs in one step.
When an [oidc] shared config is provided, resource-server config
inherits provider defaults. When None, resource-server config is
returned as-is (valid for deployments without OIDC discovery).