1
0
mirror of https://github.com/matrix-org/matrix-authentication-service.git synced 2025-07-28 11:02:02 +03:00

Provision and delete Matrix devices in OAuth sessions

This commit is contained in:
Quentin Gliech
2023-04-19 16:32:41 +02:00
parent 7003dae354
commit d34e01fc67
6 changed files with 75 additions and 21 deletions

View File

@ -39,6 +39,12 @@ impl ScopeToken {
pub const fn from_static(token: &'static str) -> Self {
Self(Cow::Borrowed(token))
}
/// Get the scope token as a string slice.
#[must_use]
pub fn as_str(&self) -> &str {
self.0.as_ref()
}
}
/// `openid`.
@ -115,7 +121,7 @@ impl std::fmt::Display for ScopeToken {
#[derive(Debug, Clone, PartialEq, Eq)]
pub struct Scope(BTreeSet<ScopeToken>);
impl std::ops::Deref for Scope {
impl Deref for Scope {
type Target = BTreeSet<ScopeToken>;
fn deref(&self) -> &Self::Target {