import { translate as t } from '@/plugins/i18n.plugin'; // From https://datatracker.ietf.org/doc/html/rfc7518#section-3.1 export const ALGORITHM_DESCRIPTIONS: { [k: string]: string } = { HS256: t('tools.jwt-parser.HS256'), HS384: t('tools.jwt-parser.HS384'), HS512: t('tools.jwt-parser.HS512'), RS256: t('tools.jwt-parser.RS256'), RS384: t('tools.jwt-parser.RS384'), RS512: t('tools.jwt-parser.RS512'), ES256: t('tools.jwt-parser.ES256'), ES384: t('tools.jwt-parser.ES384'), ES512: t('tools.jwt-parser.ES512'), PS256: t('tools.jwt-parser.PS256'), PS384: t('tools.jwt-parser.PS384'), PS512: t('tools.jwt-parser.PS512'), none: t('tools.jwt-parser.none'), }; // List extracted from IANA: https://www.iana.org/assignments/jwt/jwt.xhtml export const CLAIM_DESCRIPTIONS: Record = { typ: t('tools.jwt-parser.typ'), alg: t('tools.jwt-parser.alg'), iss: t('tools.jwt-parser.iss'), sub: t('tools.jwt-parser.sub'), aud: t('tools.jwt-parser.aud'), exp: t('tools.jwt-parser.exp'), nbf: t('tools.jwt-parser.nbf'), iat: t('tools.jwt-parser.iat'), jti: t('tools.jwt-parser.jti'), name: t('tools.jwt-parser.name'), given_name: t('tools.jwt-parser.givenName'), family_name: t('tools.jwt-parser.familyName'), middle_name: t('tools.jwt-parser.middleName'), nickname: t('tools.jwt-parser.nickname'), preferred_username: t('tools.jwt-parser.preferredUsername'), profile: t('tools.jwt-parser.profile'), picture: t('tools.jwt-parser.picture'), website: t('tools.jwt-parser.website'), email: t('tools.jwt-parser.email'), email_verified: t('tools.jwt-parser.emailVerified'), gender: t('tools.jwt-parser.gender'), birthdate: t('tools.jwt-parser.birthdate'), zoneinfo: t('tools.jwt-parser.zoneinfo'), locale: t('tools.jwt-parser.locale'), phone_number: t('tools.jwt-parser.phoneNumber'), phone_number_verified: t('tools.jwt-parser.phoneNumberVerified'), address: t('tools.jwt-parser.address'), updated_at: t('tools.jwt-parser.updatedAt'), azp: t('tools.jwt-parser.azp'), nonce: t('tools.jwt-parser.nonce'), auth_time: t('tools.jwt-parser.authTime'), at_hash: t('tools.jwt-parser.atHash'), c_hash: t('tools.jwt-parser.cHash'), acr: t('tools.jwt-parser.acr'), amr: t('tools.jwt-parser.amr'), sub_jwk: t('tools.jwt-parser.subJwk'), cnf: t('tools.jwt-parser.cnf'), sip_from_tag: t('tools.jwt-parser.sipFromTag'), sip_date: t('tools.jwt-parser.sipDate'), sip_callid: t('tools.jwt-parser.sipCallid'), sip_cseq_num: t('tools.jwt-parser.sipCseqNum'), sip_via_branch: t('tools.jwt-parser.sipViaBranch'), orig: t('tools.jwt-parser.orig'), dest: t('tools.jwt-parser.dest'), mky: t('tools.jwt-parser.mky'), events: t('tools.jwt-parser.events'), toe: t('tools.jwt-parser.toe'), txn: t('tools.jwt-parser.txn'), rph: t('tools.jwt-parser.rph'), sid: t('tools.jwt-parser.sid'), vot: t('tools.jwt-parser.vot'), vtm: t('tools.jwt-parser.vtm'), attest: t('tools.jwt-parser.attest'), origid: t('tools.jwt-parser.origid'), act: t('tools.jwt-parser.act'), scope: t('tools.jwt-parser.scope'), client_id: t('tools.jwt-parser.clientId'), may_act: t('tools.jwt-parser.mayAct'), jcard: t('tools.jwt-parser.jcard'), at_use_nbr: t('tools.jwt-parser.atUseNbr'), div: t('tools.jwt-parser.div'), opt: t('tools.jwt-parser.opt'), vc: t('tools.jwt-parser.vc'), vp: t('tools.jwt-parser.vp'), sph: t('tools.jwt-parser.sph'), ace_profile: t('tools.jwt-parser.aceProfile'), cnonce: t('tools.jwt-parser.cnonce'), exi: t('tools.jwt-parser.exi'), roles: t('tools.jwt-parser.roles'), groups: t('tools.jwt-parser.groups'), entitlements: t('tools.jwt-parser.entitlements'), token_introspection: t('tools.jwt-parser.tokenIntrospection'), };