bastantoine acc7f0a586
feat(new-tool): jwt parser (#262)
* npm install jwt-decode

* added base tool structure

* added function to decode JWT and display header and payload

* use a table to display the data

* show human readable values

* added switch to toggle display of parsed values

* lint

* replaced basic package-lock.json with pnpm-lock.json

* change the icon of the tool

* simplify return

* use camelCase

* added description of the tool

* always parse the values

* use camelCase...
2022-12-27 09:38:35 +01:00

25 lines
463 B
Vue

<template>
<n-space>
{{ value.value }}
<em v-if="value.extension">({{ value.extension }})</em>
</n-space>
</template>
<script setup lang="ts">
import { computed } from 'vue';
import { parseClaimValue } from './jwt-parser.service';
const props = defineProps({
claim: {
type: String,
default: '',
},
value: {
type: String,
default: '',
},
});
const value = computed(() => parseClaimValue(props.claim, props.value));
</script>