https://www.ory.sh/ logo
l

loud-grass-72494

01/03/2022, 10:25 AM
Hi Community, does someone know where could I find the description about the usage of each table in the database? for example
hydra_oauth2_access
,
hydra_oauth2_oidc
,
hydra_oauth2_pkce
? and for example the field
session_data
?
I'm trying to understand the I/O flow when calling the token introspection / user info endpoints
s

steep-lamp-91158

01/03/2022, 11:49 AM
unfortunately we don't have documentation about such internals, as they can change quite often (didn't for hydra for a long time probably) but then there is e.g. https://github.com/ory/hydra/pull/2836 which completely refactors the internals, but does not have breaking changes to the outside
so i.e. you have to figure it out through the code unfortunately
l

loud-grass-72494

01/03/2022, 2:39 PM
thx! when searching for session_data/sessionData I couldn't find anything, what would be a starting point?
s

steep-lamp-91158

01/03/2022, 2:47 PM
here you can find all SQL persistence related functions: https://github.com/ory/hydra/tree/master/persistence/sql the database fields are always defined in the struct tags, e.g. like https://github.com/ory/hydra/blob/33d75d791d801b5bbb2ece442c7e2836fce3a657/persistence/sql/persister_oauth2.go#L45
a

abundant-machine-24479

01/14/2022, 4:52 PM
Hi @User, Regarding the schema, all the token tables (code, access, refresh, oidc, pkce)have same schema, so what was the reason to create separate tables for each? So I was looking at 2836, and wondering if these table would merge in the future?