pub struct SecurityScheme {
pub scheme_type: String,
pub description: Option<String>,
pub name: Option<String>,
pub location: Option<String>,
pub scheme: Option<String>,
pub bearer_format: Option<String>,
pub flows: Option<OAuthFlows>,
pub open_id_connect_url: Option<String>,
}Expand description
Security scheme definition
Fields§
§scheme_type: StringType of security scheme
description: Option<String>Description
name: Option<String>Header/query parameter name (for apiKey)
location: Option<String>Location (header, query, cookie) for apiKey
scheme: Option<String>Scheme name (for http)
bearer_format: Option<String>Bearer format (for http bearer)
flows: Option<OAuthFlows>OAuth flows
open_id_connect_url: Option<String>OpenID Connect URL
Implementations§
Source§impl SecurityScheme
impl SecurityScheme
Sourcepub fn api_key(name: impl Into<String>, location: impl Into<String>) -> Self
pub fn api_key(name: impl Into<String>, location: impl Into<String>) -> Self
Create an API key security scheme
Sourcepub fn oauth2(flows: OAuthFlows) -> Self
pub fn oauth2(flows: OAuthFlows) -> Self
Create an OAuth2 security scheme
Sourcepub fn openid_connect(url: impl Into<String>) -> Self
pub fn openid_connect(url: impl Into<String>) -> Self
Create an OpenID Connect security scheme
Sourcepub fn description(self, desc: impl Into<String>) -> Self
pub fn description(self, desc: impl Into<String>) -> Self
Set description
Trait Implementations§
Source§impl Clone for SecurityScheme
impl Clone for SecurityScheme
Source§fn clone(&self) -> SecurityScheme
fn clone(&self) -> SecurityScheme
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SecurityScheme
impl Debug for SecurityScheme
Source§impl<'de> Deserialize<'de> for SecurityScheme
impl<'de> Deserialize<'de> for SecurityScheme
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for SecurityScheme
impl RefUnwindSafe for SecurityScheme
impl Send for SecurityScheme
impl Sync for SecurityScheme
impl Unpin for SecurityScheme
impl UnwindSafe for SecurityScheme
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