pub struct OAuthUserClientScopes {
pub user_id: Uuid,
pub client_id: Uuid,
pub scopes: Vec<String>,
pub granted_at: DateTime<Utc>,
}Fields§
§user_id: Uuid§client_id: Uuid§scopes: Vec<String>§granted_at: DateTime<Utc>Implementations§
Source§impl OAuthUserClientScopes
impl OAuthUserClientScopes
pub async fn insert( conn: &mut PgConnection, user_id: Uuid, client_id: Uuid, scopes: &[String], ) -> ModelResult<()>
pub async fn find_scopes( conn: &mut PgConnection, user_id: Uuid, client_id: Uuid, ) -> ModelResult<Vec<String>>
pub async fn find_distinct_clients( conn: &mut PgConnection, user_id: Uuid, ) -> ModelResult<Vec<Uuid>>
pub async fn delete_all_for_user_client( conn: &mut PgConnection, user_id: Uuid, client_id: Uuid, ) -> ModelResult<()>
Sourcepub async fn revoke_user_client_everything(
conn: &mut PgConnection,
user_id: Uuid,
client_id: Uuid,
) -> ModelResult<()>
pub async fn revoke_user_client_everything( conn: &mut PgConnection, user_id: Uuid, client_id: Uuid, ) -> ModelResult<()>
One-shot revoke: remove all scopes and tokens for a (user, client) pair atomically.
Trait Implementations§
Source§impl Clone for OAuthUserClientScopes
impl Clone for OAuthUserClientScopes
Source§fn clone(&self) -> OAuthUserClientScopes
fn clone(&self) -> OAuthUserClientScopes
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for OAuthUserClientScopes
impl Debug for OAuthUserClientScopes
Source§impl<'de> Deserialize<'de> for OAuthUserClientScopes
impl<'de> Deserialize<'de> for OAuthUserClientScopes
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl<'a, R: Row> FromRow<'a, R> for OAuthUserClientScopes
impl<'a, R: Row> FromRow<'a, R> for OAuthUserClientScopes
Source§impl PartialEq for OAuthUserClientScopes
impl PartialEq for OAuthUserClientScopes
Source§impl Serialize for OAuthUserClientScopes
impl Serialize for OAuthUserClientScopes
impl StructuralPartialEq for OAuthUserClientScopes
Auto Trait Implementations§
impl Freeze for OAuthUserClientScopes
impl RefUnwindSafe for OAuthUserClientScopes
impl Send for OAuthUserClientScopes
impl Sync for OAuthUserClientScopes
impl Unpin for OAuthUserClientScopes
impl UnwindSafe for OAuthUserClientScopes
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more