use super::super::models::oauth::*; use std::future::Future; pub trait OAuthRepository: Clone + Send + Sync + 'static { fn find_client_by_id( &self, id: uuid::Uuid, ) -> impl Future, anyhow::Error>> + Send; fn create_authorization_code( &self, user_id: uuid::Uuid, client_id: uuid::Uuid, code_challenge: String, code_challenge_method: CodeChallengeMethod, ) -> impl Future> + Send; fn is_authorized_client( &self, user_id: uuid::Uuid, client_id: uuid::Uuid, ) -> impl Future> + Send; fn get_token_subject( &self, code: AuthorizationCode, ) -> impl Future, anyhow::Error>> + Send; fn delete_token( &self, code: AuthorizationCode, ) -> impl Future> + Send; }