pub trait StsRouterExt {
// Required method
fn with_sts<C: CredentialRegistry + Clone + 'static>(
self,
path: &str,
config: C,
cache: JwksCache,
key: Option<TokenKey>,
) -> Self;
}Expand description
Extension trait for registering STS routes on a Router.
Required Methods§
Sourcefn with_sts<C: CredentialRegistry + Clone + 'static>(
self,
path: &str,
config: C,
cache: JwksCache,
key: Option<TokenKey>,
) -> Self
fn with_sts<C: CredentialRegistry + Clone + 'static>( self, path: &str, config: C, cache: JwksCache, key: Option<TokenKey>, ) -> Self
Register the STS handler on the given path.
STS requests are identified by their parameters (Action=...) — in the
query string or, as AWS SDKs send them, in a form-encoded POST body
surfaced via RequestInfo::form_body — not by path, so any path can be
used (e.g. "/" or "/.sts"). Runtimes must populate form_body for
form-encoded POSTs or SDK clients will fall through unhandled.
The handler is registered on both path and its trailing-slash variant
(/.sts and /.sts/). AWS SDK JS v3 — the STS client inside
aws-actions/configure-aws-credentials — appends a trailing slash to the
configured endpoint path, so its requests arrive at /.sts/; without the
second route they would miss the handler entirely.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".