'use strict'; var apiname = 'issuer_oauth3_org'; var baseFields = [ 'createdAt', 'updatedAt', 'deletedAt', 'revokedAt', 'insertedAt' ]; module.exports = [ { tablename: apiname + '_private_keys', idname: 'id', indices: baseFields.concat([ 'kty', 'kid' ]), }, { tablename: apiname + '_codes', idname: 'id', indices: baseFields.concat([ 'code', 'expires' ]), }, { tablename: apiname + '_credentials', idname: 'id', // credentialId = ppid@iss indices: baseFields.concat([ 'username', 'sub', 'iss', 'typ', 'salt', 'shadow' ]), // comment, recoveryCredential }, { tablename: apiname + '_credentials_profiles', idname: 'id', // credentialId = ppid@iss indices: baseFields.concat([ 'credentialId', 'profileId' ]), }, { tablename: apiname + '_profiles', idname: 'id', // make sub an ecdsa256 key indices: baseFields.concat([ 'username', 'sub', 'iss', 'typ', 'privateKey' ]), // comment, recoveryNodes }, { tablename: apiname + '_contact_nodes', idname: 'id', // contact nodes could apply to either credential or profile? indices: baseFields.concat([ 'accountId', 'priority', 'verifiedAt', 'lastVerifiedAt' ]), }, { tablename: apiname + '_jwks', idname: 'id', indices: baseFields.concat([ 'kty', 'kid', 'sub' ]), }, { tablename: apiname + '_grants', idname: 'id', indices: baseFields.concat([ 'sub', 'azp', 'azpSub', 'scope' ]), } ];