aboutsummaryrefslogtreecommitdiff
path: root/src/tools/jwt-parser/value.vue
diff options
context:
space:
mode:
authorGravatar bastantoine <bastien.antoine69+github@gmail.com> 2022-11-18 23:18:57 +0100
committerGravatar bastantoine <bastien.antoine69+github@gmail.com> 2022-11-19 11:22:00 +0100
commitb0d9fbbbaf1213086b149459c59cd1661f27c115 (patch)
treefc3f38f26b18828dbe6d3c058c23f599f9496c98 /src/tools/jwt-parser/value.vue
parent7c100f4030ce346add3bcb636505e2e24fa2278f (diff)
downloadit-tools-b0d9fbbbaf1213086b149459c59cd1661f27c115.tar.gz
it-tools-b0d9fbbbaf1213086b149459c59cd1661f27c115.tar.zst
it-tools-b0d9fbbbaf1213086b149459c59cd1661f27c115.zip
show human readable values
Diffstat (limited to '')
-rw-r--r--src/tools/jwt-parser/value.vue26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/tools/jwt-parser/value.vue b/src/tools/jwt-parser/value.vue
new file mode 100644
index 0000000..f4095c2
--- /dev/null
+++ b/src/tools/jwt-parser/value.vue
@@ -0,0 +1,26 @@
+<template>
+ <n-space>
+ {{ value.value }}
+ <i v-if="value.extension">({{ value.extension }})</i>
+ </n-space>
+</template>
+
+<script setup lang="ts">
+import { computed } from 'vue';
+import { parse_claim_value } from './jwt-parser.service';
+
+const props = defineProps({
+ claim: {
+ type: String,
+ default: '',
+ },
+ value: {
+ type: String,
+ default: '',
+ },
+});
+
+const value = computed(() => parse_claim_value(props.claim, props.value));
+</script>
+
+<style lang="less" scoped></style>