pub struct ProtectedResourceMetadata {Show 13 fields
pub resource: String,
pub resource_name: Option<String>,
pub authorization_servers: Option<Vec<String>>,
pub jwks_uri: Option<String>,
pub scopes_supported: Option<Vec<String>>,
pub bearer_methods_supported: Option<Vec<String>>,
pub resource_signing_alg_values_supported: Option<Vec<String>>,
pub resource_encryption_alg_values_supported: Option<Vec<String>>,
pub resource_encryption_enc_values_supported: Option<Vec<String>>,
pub resource_documentation: Option<String>,
pub resource_policy_uri: Option<String>,
pub resource_tos_uri: Option<String>,
pub required: Option<bool>,
}Expand description
Describes a protected resource’s authentication requirements using RFC 9728 (OAuth 2.0 Protected Resource Metadata) semantics.
Field names use snake_case to match the RFC 9728 JSON format.
Fields§
§resource: StringREQUIRED. The protected resource’s resource identifier, a URL using the
https scheme with no fragment component (e.g. "https://api.github.com").
resource_name: Option<String>OPTIONAL. Human-readable name of the protected resource.
OPTIONAL. JSON array of OAuth authorization server identifier URLs.
jwks_uri: Option<String>OPTIONAL. URL of the protected resource’s JWK Set document.
scopes_supported: Option<Vec<String>>RECOMMENDED. JSON array of OAuth 2.0 scope values used in authorization requests.
bearer_methods_supported: Option<Vec<String>>OPTIONAL. JSON array of Bearer Token presentation methods supported.
resource_signing_alg_values_supported: Option<Vec<String>>OPTIONAL. JSON array of JWS signing algorithms supported.
resource_encryption_alg_values_supported: Option<Vec<String>>OPTIONAL. JSON array of JWE encryption algorithms (alg) supported.
resource_encryption_enc_values_supported: Option<Vec<String>>OPTIONAL. JSON array of JWE encryption algorithms (enc) supported.
resource_documentation: Option<String>OPTIONAL. URL of human-readable documentation for the resource.
resource_policy_uri: Option<String>OPTIONAL. URL of the resource’s data-usage policy.
resource_tos_uri: Option<String>OPTIONAL. URL of the resource’s terms of service.
required: Option<bool>AHP extension. Whether authentication is required for this resource.
true(default) — the agent cannot be used without a valid token. The server SHOULD returnAuthRequired(-32007) if the client attempts to use the agent without authenticating.false— the agent works without authentication but MAY offer enhanced capabilities when a token is provided.
Clients SHOULD treat an absent field the same as true.
Trait Implementations§
Source§impl Clone for ProtectedResourceMetadata
impl Clone for ProtectedResourceMetadata
Source§fn clone(&self) -> ProtectedResourceMetadata
fn clone(&self) -> ProtectedResourceMetadata
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ProtectedResourceMetadata
impl Debug for ProtectedResourceMetadata
Source§impl<'de> Deserialize<'de> for ProtectedResourceMetadata
impl<'de> Deserialize<'de> for ProtectedResourceMetadata
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>,
Source§impl PartialEq for ProtectedResourceMetadata
impl PartialEq for ProtectedResourceMetadata
Source§fn eq(&self, other: &ProtectedResourceMetadata) -> bool
fn eq(&self, other: &ProtectedResourceMetadata) -> bool
self and other values to be equal, and is used by ==.