You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-20 12:02:22 +03:00
Implement the device code authorisation request
This commit is contained in:
@@ -695,6 +695,13 @@ pub struct DeviceCodeLink {
|
||||
code: Option<String>,
|
||||
}
|
||||
|
||||
impl DeviceCodeLink {
|
||||
#[must_use]
|
||||
pub fn with_code(code: String) -> Self {
|
||||
Self { code: Some(code) }
|
||||
}
|
||||
}
|
||||
|
||||
impl Route for DeviceCodeLink {
|
||||
type Query = DeviceCodeLink;
|
||||
fn route() -> &'static str {
|
||||
@@ -706,6 +713,14 @@ impl Route for DeviceCodeLink {
|
||||
}
|
||||
}
|
||||
|
||||
/// `POST /oauth2/device`
|
||||
#[derive(Default, Serialize, Deserialize, Debug, Clone)]
|
||||
pub struct OAuth2DeviceAuthorizationEndpoint;
|
||||
|
||||
impl SimpleRoute for OAuth2DeviceAuthorizationEndpoint {
|
||||
const PATH: &'static str = "/oauth2/device";
|
||||
}
|
||||
|
||||
/// `GET /assets`
|
||||
pub struct StaticAsset {
|
||||
path: String,
|
||||
|
||||
Reference in New Issue
Block a user