pub struct AuthMetadataBuilder<'a> { /* private fields */ }Implementations§
Source§impl<'a> AuthMetadataBuilder<'a>
impl<'a> AuthMetadataBuilder<'a>
Sourcepub fn new(protected_resource_url: &'a str) -> Self
pub fn new(protected_resource_url: &'a str) -> Self
Creates a new instance of the builder for the given protected resource.
The protected_resource parameter must specify the full URL of the MCP server.
pub async fn from_discovery_url<S>( discovery_url: &str, protected_resource: S, required_scopes: Vec<S>, ) -> Result<Self, McpSdkError>
pub fn scopes_supported<S>(self, scopes: Vec<S>) -> Self
pub fn issuer<S>(self, issuer: S) -> Self
pub fn service_documentation<S>(self, url: S) -> Self
pub fn token_endpoint<S>(self, url: S) -> Self
pub fn response_types_supported<S>(self, types: Vec<S>) -> Self
pub fn response_modes_supported<S>(self, modes: Vec<S>) -> Self
pub fn registration_endpoint(self, url: &'a str) -> Self
pub fn userinfo_endpoint(self, url: &'a str) -> Self
pub fn grant_types_supported<S>(self, types: Vec<S>) -> Self
pub fn token_endpoint_auth_methods_supported<S>(self, methods: Vec<S>) -> Self
pub fn token_endpoint_auth_signing_alg_values_supported<S>( self, algs: Vec<S>, ) -> Self
pub fn revocation_endpoint(self, url: &'a str) -> Self
pub fn revocation_endpoint_auth_methods_supported<S>( self, methods: Vec<S>, ) -> Self
pub fn revocation_endpoint_auth_signing_alg_values_supported<S>( self, algs: Vec<S>, ) -> Self
pub fn introspection_endpoint(self, endpoint: &'a str) -> Self
pub fn introspection_endpoint_auth_methods_supported<S>( self, methods: Vec<S>, ) -> Self
pub fn introspection_endpoint_auth_signing_alg_values_supported<S>( self, algs: Vec<String>, ) -> Self
pub fn code_challenge_methods_supported<S>(self, methods: Vec<S>) -> Self
pub fn resource(self, url: &'a str) -> Self
pub fn reqquired_scopes<S>(self, scopes: Vec<S>) -> Self
pub fn resource_documentation<S>(self, doc: String) -> Self
pub fn jwks_uri(self, url: &'a str) -> Self
pub fn bearer_methods_supported<S>(self, methods: Vec<S>) -> Self
pub fn resource_signing_alg_values_supported<S>(self, algs: Vec<S>) -> Self
pub fn resource_name<S>(self, name: S) -> Self
pub fn resource_policy_uri(self, url: &'a str) -> Self
pub fn resource_tos_uri(self, url: &'a str) -> Self
pub fn tls_client_certificate_bound_access_tokens(self, value: bool) -> Self
pub fn dpop_signing_alg_values_supported<S>(self, algs: Vec<S>) -> Self
pub fn dpop_bound_access_tokens_required(self, value: bool) -> Self
pub fn build( self, ) -> Result<(AuthorizationServerMetadata, OauthProtectedResourceMetadata), McpSdkError>
Trait Implementations§
Source§impl<'a> Default for AuthMetadataBuilder<'a>
impl<'a> Default for AuthMetadataBuilder<'a>
Source§fn default() -> AuthMetadataBuilder<'a>
fn default() -> AuthMetadataBuilder<'a>
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl<'a> Freeze for AuthMetadataBuilder<'a>
impl<'a> RefUnwindSafe for AuthMetadataBuilder<'a>
impl<'a> Send for AuthMetadataBuilder<'a>
impl<'a> Sync for AuthMetadataBuilder<'a>
impl<'a> Unpin for AuthMetadataBuilder<'a>
impl<'a> UnwindSafe for AuthMetadataBuilder<'a>
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