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
Use unstable prefixes for scope names (#337)
This commit is contained in:
@@ -219,7 +219,7 @@ pub(crate) async fn complete(
|
||||
let lacks_consent = grant
|
||||
.scope
|
||||
.difference(¤t_consent)
|
||||
.any(|scope| !scope.starts_with("urn:matrix:device:"));
|
||||
.any(|scope| !scope.starts_with("urn:matrix:org.matrix.msc2967.client:device:"));
|
||||
|
||||
// Check if the client lacks consent *or* if consent was explicitely asked
|
||||
if lacks_consent || grant.requires_consent {
|
||||
|
||||
@@ -153,11 +153,11 @@ pub(crate) async fn post(
|
||||
return Err(anyhow::anyhow!("policy violation").into());
|
||||
}
|
||||
|
||||
// Do not consent for the "urn:matrix:device:*" scope
|
||||
// Do not consent for the "urn:matrix:org.matrix.msc2967.client:device:*" scope
|
||||
let scope_without_device = grant
|
||||
.scope
|
||||
.iter()
|
||||
.filter(|s| !s.starts_with("urn:matrix:device:"))
|
||||
.filter(|s| !s.starts_with("urn:matrix:org.matrix.msc2967.client:device:"))
|
||||
.cloned()
|
||||
.collect();
|
||||
insert_client_consent(
|
||||
|
||||
Reference in New Issue
Block a user