Versions

  • v33

    3/2/2024
    Open: Version
    Changes from v32 to v33
    +4
    -3
    ⦚ 49 unchanged lines ⦚
    const filenameChanged = ref(false);
    const selected = ref(false);

    const blob = computed(() => {
    ⦚ 4 unchanged lines ⦚
    </script>
    <template>
    <form class="left">
    <label>
    Prefix:
    ⦚ 5 unchanged lines ⦚
    </form>
    <form class="right">
    <label>
    Filename:
    <input v-model="filename" name="filename" @change="filenameChanged" />
    </label>
    <button @click="saveAs(blob, filename)">
    Download as {{ filename }}
    </button>
    ⦚ 59 unchanged lines ⦚
    ⦚ 49 unchanged lines ⦚
    const filenameChanged = ref(false);
    const selected = ref(false);
    const $textarea = ref();

    const blob = computed(() => {
    ⦚ 4 unchanged lines ⦚
    </script>
    <template>
    <form class="left" @submit.stop="generate(); $textarea.select()">
    <label>
    Prefix:
    ⦚ 5 unchanged lines ⦚
    </form>
    <form class="right" @submit.stop="saveAs(blob, filename)">
    <label>
    Filename:
    <input v-model="filename" name="filename" @change="filenameChanged" />
    </label>
    <button>
    Download as {{ filename }}
    </button>
    ⦚ 59 unchanged lines ⦚
  • v32

    3/2/2024
    Open: Version
    Changes from v31 to v32
    +1
    -1
    ⦚ 113 unchanged lines ⦚
    Check the <a href="${
    getRedirectUrl(import.meta.url, "GenerateJWKSEnv")
    }">source code</a> to make sure I'm not stealing your keys.
    </li>
    <li>
    ⦚ 18 unchanged lines ⦚
    ⦚ 113 unchanged lines ⦚
    Check the <a href="${
    getRedirectUrl(import.meta.url, "GenerateJWKSEnv")
    }">source code</a> to make sure I'm not stealing your keys 😊
    </li>
    <li>
    ⦚ 18 unchanged lines ⦚
  • v31

    3/2/2024
    Open: Version
    Changes from v30 to v31
    +6
    -0
    import { htmlResponse, Layout } from "https://esm.town/v/postpostscript/htmlComponentLibrary";
    import { vueSfcInline } from "https://esm.town/v/postpostscript/vue";

    export const GenerateJWKSEnv = vueSfcInline`
    ⦚ 105 unchanged lines ⦚
    <h2>Steps</h2>
    <ol>
    <li>
    Click "Download as [filename]"
    ⦚ 17 unchanged lines ⦚
    import { htmlResponse, Layout } from "https://esm.town/v/postpostscript/htmlComponentLibrary";
    import { getRedirectUrl } from "https://esm.town/v/postpostscript/moduleHighlightValueLink";
    import { vueSfcInline } from "https://esm.town/v/postpostscript/vue";

    export const GenerateJWKSEnv = vueSfcInline`
    ⦚ 105 unchanged lines ⦚
    <h2>Steps</h2>
    <ol>
    <li>
    Check the <a href="${
    getRedirectUrl(import.meta.url, "GenerateJWKSEnv")
    }">source code</a> to make sure I'm not stealing your keys.
    </li>
    <li>
    Click "Download as [filename]"
    ⦚ 17 unchanged lines ⦚
  • v30

    3/2/2024
    Open: Version
    Changes from v29 to v30
    +0
    -5
    ⦚ 86 unchanged lines ⦚
    text-align: right;
    }
    .right {
    input {
    float: right;
    }
    }

    label {
    ⦚ 40 unchanged lines ⦚
    ⦚ 86 unchanged lines ⦚
    text-align: right;
    }

    label {
    ⦚ 40 unchanged lines ⦚
  • v29

    3/2/2024
    Open: Version
    Changes from v28 to v29
    +1
    -1
    ⦚ 88 unchanged lines ⦚
    .right {
    input {
    float: rigth;
    }
    }
    ⦚ 42 unchanged lines ⦚
    ⦚ 88 unchanged lines ⦚
    .right {
    input {
    float: right;
    }
    }
    ⦚ 42 unchanged lines ⦚
  • v28

    3/2/2024
    Open: Version
    Changes from v27 to v28
    +5
    -0
    ⦚ 86 unchanged lines ⦚
    text-align: right;
    }

    label {
    ⦚ 40 unchanged lines ⦚
    ⦚ 86 unchanged lines ⦚
    text-align: right;
    }
    .right {
    input {
    float: rigth;
    }
    }

    label {
    ⦚ 40 unchanged lines ⦚
  • v27

    3/2/2024
    Open: Version
    Changes from v26 to v27
    +1
    -1
    ⦚ 121 unchanged lines ⦚
    </li>
    <li>
    Upload the file you just downloaded.
    </li>
    <li>
    ⦚ 4 unchanged lines ⦚
    ⦚ 121 unchanged lines ⦚
    </li>
    <li>
    Upload the file you just downloaded
    </li>
    <li>
    ⦚ 4 unchanged lines ⦚
  • v26

    3/2/2024
    Open: Version
    Changes from v25 to v26
    +0
    -1
    ⦚ 94 unchanged lines ⦚
    input {
    margin-right: 0;
    width: 100%;
    }

    ⦚ 32 unchanged lines ⦚
    ⦚ 94 unchanged lines ⦚
    input {
    margin-right: 0;
    }

    ⦚ 32 unchanged lines ⦚
  • v25

    3/2/2024
    Open: Version
    +131
    -0

    import { htmlResponse, Layout } from "https://esm.town/v/postpostscript/htmlComponentLibrary";
    import { vueSfcInline } from "https://esm.town/v/postpostscript/vue";

    export const GenerateJWKSEnv = vueSfcInline`
    <script setup lang="ts">
    import { ref, computed, onMounted } from "vue";
    import { exportJWK, generateKeyPair } from "https://esm.sh/jose@v5.2.2";

    import fileSaver from "https://esm.sh/file-saver@v2.0.5";
    const { default: saveAs } = fileSaver;

    function outputKey(key) {
    return JSON.stringify({
    keys: [
    {
    alg: alg.value,
    ...key,
    }
    ]
    })
    }

    async function generate() {
    const { publicKey, privateKey } = await generateKeyPair(alg.value, {
    extractable: true,
    });

    publicJWK.value = await exportJWK(publicKey)
    privateJWK.value = await exportJWK(privateKey)
    file.value = \`
    \${prefix.value}_PUBLIC=\${outputKey(publicJWK.value)}
    \${prefix.value}_PRIVATE=\${outputKey(privateJWK.value)}
    \`.trim()
    if (!filenameChanged.value) {
    filename.value = prefix.value + ".env";