You've already forked authentication-service
mirror of
https://github.com/matrix-org/matrix-authentication-service.git
synced 2025-11-21 23:00:50 +03:00
data-model: don't embed the client in the auth grant
This commit is contained in:
@@ -21,11 +21,11 @@ use oauth2_types::{
|
||||
requests::ResponseMode,
|
||||
};
|
||||
use serde::Serialize;
|
||||
use thiserror::Error;
|
||||
use ulid::Ulid;
|
||||
use url::Url;
|
||||
|
||||
use super::{client::Client, session::Session};
|
||||
use super::session::Session;
|
||||
use crate::InvalidTransitionError;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize)]
|
||||
pub struct Pkce {
|
||||
@@ -53,10 +53,6 @@ pub struct AuthorizationCode {
|
||||
pub pkce: Option<Pkce>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Error)]
|
||||
#[error("invalid state transition")]
|
||||
pub struct InvalidTransitionError;
|
||||
|
||||
#[derive(Debug, Clone, PartialEq, Eq, Serialize, Default)]
|
||||
#[serde(tag = "stage", rename_all = "lowercase")]
|
||||
pub enum AuthorizationGrantStage {
|
||||
@@ -132,7 +128,7 @@ pub struct AuthorizationGrant {
|
||||
#[serde(flatten)]
|
||||
pub stage: AuthorizationGrantStage,
|
||||
pub code: Option<AuthorizationCode>,
|
||||
pub client: Client,
|
||||
pub client_id: Ulid,
|
||||
pub redirect_uri: Url,
|
||||
pub scope: oauth2_types::scope::Scope,
|
||||
pub state: Option<String>,
|
||||
|
||||
Reference in New Issue
Block a user