Credential for OAuth2

I use Kong gateway (DB-less mode) and building a custom plugin.
Rather than storing OAuth2 credentials in plugin config, is it possible to store credentials in structure like basicauth_credentials (existing or build a custom one)?

xxx_credentials:

Hi @Tim_Yau, you should be able to achieve that by creating a custom entity, you can ignore the migration steps if you are only interested in running this dbless. You can then select your custom entities from the plugin’s code using for example: local e = kong.db.<your_entity>:select_by_<field>(<value>), similarly to how basicauth_credentials are loaded.

I hope that helps.