1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-08-06 06:02:40 +03:00

Implement the device access token request

This commit is contained in:
Quentin Gliech
2023-12-08 16:11:20 +01:00
parent 67ab42155c
commit 7d9d97a006
5 changed files with 366 additions and 10 deletions

View File

@@ -500,7 +500,7 @@ pub struct ClientCredentialsGrant {
#[derive(Serialize, Deserialize, Clone, PartialEq, Eq)]
pub struct DeviceCodeGrant {
/// The device verification code, from the device authorization response.
pub device_code: Option<Scope>,
pub device_code: String,
}
impl fmt::Debug for DeviceCodeGrant {
@@ -559,6 +559,7 @@ pub enum GrantType {
/// [Token Endpoint]: https://www.rfc-editor.org/rfc/rfc6749#section-3.2
#[derive(Serialize, Deserialize, Debug, Clone, PartialEq, Eq)]
#[serde(tag = "grant_type", rename_all = "snake_case")]
#[non_exhaustive]
pub enum AccessTokenRequest {
/// A request in the Authorization Code flow.
AuthorizationCode(AuthorizationCodeGrant),