about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorFrederick Muriuki Muriithi2026-08-28 17:40:09 +0000
committerFrederick Muriuki Muriithi2026-08-28 12:43:48 -0500
commitcdf3daefaa6b7870b2f36da440c59c327ea1d62f (patch)
treec497dcef75fc64677664c6efba60b0baa76c8e4e /tests
parent800913ddee45fcb0b0e3a9d8c3917d3cf9644ca4 (diff)
downloadgn-auth-cdf3daefaa6b7870b2f36da440c59c327ea1d62f.tar.gz
fix(jwt-bearer-token): use AUTH_DB instead of SQL_URI for user/client lookup
JWTBearerToken.__init__ was calling with_db_connection with
app.config["SQL_URI"] (the GeneNetwork MariaDB URI) to look up the
authenticated user and OAuth2 client.  gn_libs.sqlite3.with_db_connection
expects a SQLite file path, so passing a MySQL URI causes an
OperationalError: unable to open database file every time a JWT is
validated through require_oauth.acquire().

Use app.config["AUTH_DB"] (the gn-auth SQLite database) for both
lookups.  Also normalise the whitespace in the user lookup lambda while
here.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Reviewed-By: Frederick M. Muriithi <fredmanglis@gmail.com>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions