1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-28 11:02:02 +03:00

Add Pushed Authorization Request response type

This commit is contained in:
Kévin Commaille
2022-09-05 10:22:17 +02:00
committed by Quentin Gliech
parent ba63673552
commit 91ce8ff5fe

View File

@ -529,6 +529,24 @@ pub struct IntrospectionResponse {
pub jti: Option<String>,
}
/// A successful response from the [Pushed Authorization Request Endpoint].
///
/// Note that there is no request type because it is by definition the same as
/// [`AuthorizationRequest`].
///
/// [Pushed Authorization Request Endpoint]: https://datatracker.ietf.org/doc/html/rfc9126
#[serde_as]
#[skip_serializing_none]
#[derive(Serialize, Deserialize, Debug, PartialEq, Eq)]
pub struct PushedAuthorizationResponse {
/// The `request_uri` to use for the request to the authorization endpoint.
pub request_uri: String,
/// The duration for which the request URI is valid.
#[serde_as(as = "DurationSeconds<i64>")]
pub expires_in: Duration,
}
#[cfg(test)]
mod tests {
use serde_json::json;