]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
auth: sasl-server-mech-oauth2 - Split off auth_sasl_oauth2_verify_token()
authorStephan Bosch <stephan.bosch@open-xchange.com>
Sat, 4 Nov 2023 13:44:31 +0000 (14:44 +0100)
committertimo.sirainen <timo.sirainen@open-xchange.com>
Thu, 9 Oct 2025 08:41:22 +0000 (08:41 +0000)
Will be moved.

src/auth/sasl-server-mech-oauth2.c

index a492a9ddb7f06525e97f1f9595d034126932bbad..200a1437a3ba06c746d8eb7b066b7cf8a8cbd7bc 100644 (file)
@@ -211,8 +211,8 @@ mech_oauth2_verify_token_local_continue(struct db_oauth2_request *db_req,
 }
 
 static void
-mech_oauth2_verify_token(struct oauth2_auth_request *oauth2_req,
-                        const char *token)
+auth_sasl_oauth2_verify_token(struct oauth2_auth_request *oauth2_req,
+                            const char *token)
 {
        struct auth_request *auth_request = &oauth2_req->request;
 
@@ -240,6 +240,14 @@ mech_oauth2_verify_token(struct oauth2_auth_request *oauth2_req,
        }
 }
 
+static void
+mech_oauth2_verify_token(struct oauth2_auth_request *oauth2_req,
+                        const char *token)
+{
+       i_assert(token != NULL);
+       auth_sasl_oauth2_verify_token(oauth2_req, token);
+}
+
 /* Input syntax for data:
  gs2flag,a=username,^Afield=...^Afield=...^Aauth=Bearer token^A^A
 */