pub struct AuthorizationRequest {
pub action: String,
pub authority_id: String,
pub context: Option<QueryContext>,
pub entity_id: String,
pub ext: Option<Ext>,
pub resource: String,
}Expand description
TRQP v2.0 authorization query: ask a trust registry whether an entity is authorized by an authority for a given action+resource. Field names are verbatim from the TRQP authorization request/response schemas so the same payload serves the plain HTTP TRQP binding and the Trust Task binding.
JSON schema
{
"$id": "https://trusttasks.org/spec/registry/authorization/0.1",
"title": "Payload",
"description": "TRQP v2.0 authorization query: ask a trust registry whether an entity is authorized by an authority for a given action+resource. Field names are verbatim from the TRQP authorization request/response schemas so the same payload serves the plain HTTP TRQP binding and the Trust Task binding.",
"type": "object",
"required": [
"action",
"authority_id",
"entity_id",
"resource"
],
"properties": {
"action": {
"description": "The action the query is checking authorization for.",
"type": "string"
},
"authority_id": {
"description": "Identifier of the authority being queried.",
"type": "string"
},
"context": {
"$ref": "#/definitions/QueryContext"
},
"entity_id": {
"description": "Identifier of the entity being tested for authorization.",
"type": "string"
},
"ext": {
"$ref": "#/definitions/Ext"
},
"resource": {
"description": "The resource the query is checking authorization for.",
"type": "string"
}
},
"additionalProperties": false
}Fields§
§action: StringThe action the query is checking authorization for.
Identifier of the authority being queried.
context: Option<QueryContext>§entity_id: StringIdentifier of the entity being tested for authorization.
ext: Option<Ext>§resource: StringThe resource the query is checking authorization for.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Payload
impl<'de> Deserialize<'de> for Payload
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Payload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Payload, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Payload for Payload
impl Payload for Payload
Source§const TYPE_URI: &'static str = "https://trusttasks.org/spec/registry/authorization/0.1"
const TYPE_URI: &'static str = "https://trusttasks.org/spec/registry/authorization/0.1"
The canonical Type URI this payload targets, including the
#response
fragment for success-response payloads (SPEC.md §4.4.1).Source§const IS_RECIPIENT_REQUIRED: bool = true
const IS_RECIPIENT_REQUIRED: bool = true
Whether the originating Trust Task specification obliges a consumer
to reject a document that arrives without an in-band
recipient, per
SPEC.md §7.2 item 5 and §7.3 item 5 (the party filling the recipient
member is declared REQUIRED). Read moreSource§const IS_BEARER: bool = false
const IS_BEARER: bool = false
Whether the originating Trust Task specification is a bearer
specification per SPEC.md §4.8.3 — that is, opts out of the §4.8.2
audience-binding rule. Read more
Source§const IS_PROOF_REQUIRED: bool = false
const IS_PROOF_REQUIRED: bool = false
Whether the originating Trust Task specification obliges a consumer
to reject a document that arrives without a
proof, per SPEC.md §7.3
item 8 (proofRequirement.requirement == "REQUIRED"). Read moreSource§fn extended_code(local: impl Into<String>) -> TrustTaskCode
fn extended_code(local: impl Into<String>) -> TrustTaskCode
Build an extended
TrustTaskCode under this payload’s slug, per
SPEC.md §8.5. Read moreSource§fn family_code(namespace: &str, local: impl Into<String>) -> TrustTaskCode
fn family_code(namespace: &str, local: impl Into<String>) -> TrustTaskCode
Build an extended
TrustTaskCode under a family namespace, per
SPEC.md §8.5 rule 2. Read moreSource§impl Serialize for Payload
impl Serialize for Payload
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
Auto Trait Implementations§
impl Freeze for Payload
impl RefUnwindSafe for Payload
impl Send for Payload
impl Sync for Payload
impl Unpin for Payload
impl UnsafeUnpin for Payload
impl UnwindSafe for Payload
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