From bc3f66573968b068c332d391ffffa90088e643db Mon Sep 17 00:00:00 2001 From: Quentin Gliech Date: Wed, 6 Sep 2023 09:18:17 +0200 Subject: [PATCH] graphql: expose the logo_uri in the OAuth 2.0 client Fixes #1705 --- crates/graphql/src/model/oauth.rs | 5 +++++ frontend/schema.graphql | 4 ++++ frontend/src/gql/graphql.ts | 2 ++ frontend/src/gql/schema.ts | 8 ++++++++ 4 files changed, 19 insertions(+) diff --git a/crates/graphql/src/model/oauth.rs b/crates/graphql/src/model/oauth.rs index 87445247..532058d5 100644 --- a/crates/graphql/src/model/oauth.rs +++ b/crates/graphql/src/model/oauth.rs @@ -158,6 +158,11 @@ impl OAuth2Client { self.0.client_uri.as_ref() } + /// Logo URI advertised by the client. + pub async fn logo_uri(&self) -> Option<&Url> { + self.0.logo_uri.as_ref() + } + /// Terms of services URI advertised by the client. pub async fn tos_uri(&self) -> Option<&Url> { self.0.tos_uri.as_ref() diff --git a/frontend/schema.graphql b/frontend/schema.graphql index a1c8c64a..e27f059d 100644 --- a/frontend/schema.graphql +++ b/frontend/schema.graphql @@ -634,6 +634,10 @@ type Oauth2Client implements Node { """ clientUri: Url """ + Logo URI advertised by the client. + """ + logoUri: Url + """ Terms of services URI advertised by the client. """ tosUri: Url diff --git a/frontend/src/gql/graphql.ts b/frontend/src/gql/graphql.ts index 8f261677..db90c12c 100644 --- a/frontend/src/gql/graphql.ts +++ b/frontend/src/gql/graphql.ts @@ -485,6 +485,8 @@ export type Oauth2Client = Node & { contacts: Array; /** ID of the object. */ id: Scalars["ID"]["output"]; + /** Logo URI advertised by the client. */ + logoUri?: Maybe; /** Privacy policy URI advertised by the client. */ policyUri?: Maybe; /** List of redirect URIs used for authorization grants by the client. */ diff --git a/frontend/src/gql/schema.ts b/frontend/src/gql/schema.ts index d69b1dbe..b2b771d7 100644 --- a/frontend/src/gql/schema.ts +++ b/frontend/src/gql/schema.ts @@ -1261,6 +1261,14 @@ export default { }, args: [], }, + { + name: "logoUri", + type: { + kind: "SCALAR", + name: "Any", + }, + args: [], + }, { name: "policyUri", type: {