diff --git a/templates/base.html b/templates/base.html index 618b325ca..42593abc4 100644 --- a/templates/base.html +++ b/templates/base.html @@ -20,6 +20,7 @@ limitations under the License. {% import "components/logout.html" as logout %} {% import "components/navbar.html" as navbar %} {% import "components/errors.html" as errors %} +{% import "components/scope.html" as scope %} diff --git a/templates/components/scope.html b/templates/components/scope.html new file mode 100644 index 000000000..bc7a36ee9 --- /dev/null +++ b/templates/components/scope.html @@ -0,0 +1,39 @@ +{# +Copyright 2023 The Matrix.org Foundation C.I.C. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +#} + +{% macro list(scopes) %} + +{% endmacro %} diff --git a/templates/pages/consent.html b/templates/pages/consent.html index 56873c87d..32337b363 100644 --- a/templates/pages/consent.html +++ b/templates/pages/consent.html @@ -27,38 +27,18 @@ limitations under the License. {% endif %} -

{{ client.client_name | default(value=client.client_id) }}

-

at {{ grant.redirect_uri }}

-

wants to access your Matrix account

+

{{ client.client_name | default(value=client.client_id) }}

+

at {{ grant.redirect_uri | simplify_url }}

+

wants to access your account

This will allow {{ client.client_name | default(value=client.client_id) }} to:

-

+ {{ scope::list(scopes=grant.scope) }}

-

Make sure that you trust {{ client.client_name }}

+

Make sure that you trust {{ client.client_name | default(value=client.client_id) }}.

You may be sharing sensitive information with this site or app. {% if client.policy_uri or client.tos_uri %} diff --git a/templates/pages/sso.html b/templates/pages/sso.html index 87b0a435f..31817e1e4 100644 --- a/templates/pages/sso.html +++ b/templates/pages/sso.html @@ -23,7 +23,18 @@ limitations under the License.

{{ login.redirect_uri | simplify_url }}

-

wants to access your Matrix account

+

wants to access your account

+
+
+
+

This will allow it to:

+ +

+ {{ scope::list(scopes="openid urn:matrix:org.matrix.msc2967.client:api:*") }} +

+ +

Make sure that you trust it.

+