Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
e4a931c
Bump actions/checkout from 4 to 5 (#1)
dependabot[bot] Aug 27, 2025
ce57a84
🩹 [Patch]: Bump Process-PSModule to v5 (#4)
MariusStorhaug Oct 4, 2025
609a4d0
🪲 [Fix]: Fix linter settings and docs (#5)
MariusStorhaug Oct 9, 2025
0266323
Pin Process-PSModule workflow reference to immutable SHA (#6)
MariusStorhaug Apr 5, 2026
e2c9613
⬆️ [Dependency]: Update Process-PSModule to v5.4.6 (#7)
MariusStorhaug Apr 5, 2026
8032dfc
🪲 [Fix]: Add .codespellrc to skip linter config directory (#8)
MariusStorhaug Apr 5, 2026
486bfb9
Bump PSModule/Process-PSModule/.github/workflows/workflow.yml from 5.…
dependabot[bot] May 7, 2026
dde4b24
[Init]: Boilerplate scaffold removed (#12)
MariusStorhaug May 7, 2026
d55348f
✨ [Feature]: Implement JWT encoding and decoding functions with tests
MariusStorhaug May 9, 2026
969330f
Align Jwt package metadata with maintained module
MariusStorhaug May 9, 2026
18c2e60
Align Jwt manifest with Process-PSModule generation
MariusStorhaug May 9, 2026
9667c77
[Cleanup]: Remove unused module metadata and related tests
MariusStorhaug May 9, 2026
82890a0
✨ [Test]: Update test cases to use array for ExtractionToken and Expe…
MariusStorhaug May 9, 2026
493f02a
Fix JWT linter configuration and analyzer findings
MariusStorhaug May 9, 2026
9faac43
Use targeted scanner ignores for JWT examples
MariusStorhaug May 9, 2026
ebb65b6
[Cleanup]: Uncomment Build section in PSModule.yml
MariusStorhaug May 9, 2026
cf50d27
✨ [Feature]: Implement Base64Url encoding and decoding functions for …
MariusStorhaug May 9, 2026
cc523b3
✨ [Feature]: Add Base64Url encoding and decoding functions for JWT ha…
MariusStorhaug May 9, 2026
cffa23c
✨ [Feature]: Add functions for Base64Url encoding/decoding and JWT ha…
MariusStorhaug May 9, 2026
56f7649
✨ [Feature]: Export all functions and aliases for easier access
MariusStorhaug May 9, 2026
de93e8c
✨ [Feature]: Add Base64Url encoding/decoding functions and JWT handli…
MariusStorhaug May 10, 2026
8270d5b
✨ [Feature]: Enhance JWT functions with improved documentation and ex…
MariusStorhaug May 10, 2026
6b54221
✨ [Feature]: Update links in function documentation to point to new m…
MariusStorhaug May 10, 2026
726ffa9
Fix JWT hardening gaps from PR review
MariusStorhaug May 10, 2026
4ae210b
Restore trivy.yaml to prevent default exit-code:1 triggering on test …
MariusStorhaug May 10, 2026
243d072
Fix reviewer-identified hardening gaps: typed exceptions without toke…
MariusStorhaug May 10, 2026
383fcf9
Fix PSAvoidLongLines on test line 85: split long Should -Throw assertion
MariusStorhaug May 10, 2026
942101a
Fix reviewer-identified issues: RS256 malformed-sig guard, typed para…
MariusStorhaug May 10, 2026
dfc6645
Fix missing alg validation and add paramName to ArgumentException; ad…
MariusStorhaug May 11, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/PSModule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,27 @@
Test:
CodeCoverage:
PercentTarget: 0
# TestResults:
# Skip: true
# SourceCode:
# Skip: true
# PSModule:
# Skip: true
# Module:
# Windows:
# Skip: true
# MacOS:
# Skip: true
Build:
Docs:
Skip: true

Linter:
env:
VALIDATE_BIOME_FORMAT: false
VALIDATE_BIOME_LINT: false
VALIDATE_GITHUB_ACTIONS_ZIZMOR: false
VALIDATE_JSCPD: false
VALIDATE_JSON_PRETTIER: false
VALIDATE_MARKDOWN_PRETTIER: false
VALIDATE_YAML_PRETTIER: false
3 changes: 3 additions & 0 deletions .github/linters/.codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[codespell]
skip = ./.github/linters
ignore-words-list = afterall
10 changes: 0 additions & 10 deletions .github/linters/.jscpd.json

This file was deleted.

17 changes: 9 additions & 8 deletions .github/linters/.markdown-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,19 @@
###############
# Rules by id #
###############
MD004: false # Unordered list style
MD004: false # Unordered list style
MD007:
indent: 2 # Unordered list indentation
indent: 2 # Unordered list indentation
MD013:
line_length: 808 # Line length
line_length: 808 # Line length
MD024: false # no-duplicate-heading, INPUTS and OUTPUTS _can_ be the same item
MD026:
punctuation: ".,;:!。,;:" # List of not allowed
MD029: false # Ordered list item prefix
MD033: false # Allow inline HTML
MD036: false # Emphasis used instead of a heading
punctuation: '.,;:!。,;:' # List of not allowed
MD029: false # Ordered list item prefix
MD033: false # Allow inline HTML
MD036: false # Emphasis used instead of a heading

#################
# Rules by tags #
#################
blank_lines: false # Error on blank lines
blank_lines: false # Error on blank lines
10 changes: 10 additions & 0 deletions .github/linters/trivy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
scan:
disable-telemetry: true
scanners:
- vuln
- misconfig
- secret
skip-files:
# src/JWT.psm1 is a build artifact generated by Process-PSModule and is
# not present in source. Skip it so lint runs against checked-in files only.
- src/JWT.psm1
Comment thread
MariusStorhaug marked this conversation as resolved.
32 changes: 0 additions & 32 deletions .github/workflows/Linter.yml

This file was deleted.

17 changes: 0 additions & 17 deletions .github/workflows/Nightly-Run.yml

This file was deleted.

10 changes: 5 additions & 5 deletions .github/workflows/Process-PSModule.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
name: Process-PSModule

run-name: "Process-PSModule - [${{ github.event.pull_request.title }} #${{ github.event.pull_request.number }}] by @${{ github.actor }}"

on:
workflow_dispatch:
schedule:
- cron: '0 0 * * *'
pull_request:
branches:
- main
Expand All @@ -26,6 +27,5 @@ permissions:

jobs:
Process-PSModule:
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@v4
secrets:
APIKEY: ${{ secrets.APIKEY }}
uses: PSModule/Process-PSModule/.github/workflows/workflow.yml@11117919e65242d3388727819a751f74ad24ea9e # v5.5.0
secrets: inherit
Comment thread
MariusStorhaug marked this conversation as resolved.
Comment thread
MariusStorhaug marked this conversation as resolved.
Comment thread
MariusStorhaug marked this conversation as resolved.
61 changes: 31 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,53 +1,54 @@
# {{ NAME }}
# Jwt

{{ DESCRIPTION }}

## Prerequisites

This uses the following external resources:
- The [PSModule framework](https://github.com/PSModule/Process-PSModule) for building, testing and publishing the module.
`Jwt` is a PowerShell module for creating and verifying JSON Web Tokens. This repository maintains the current `Jwt` module command surface under PSModule maintenance so existing users can continue to install and use the package from PowerShell Gallery.

## Installation

To install the module from the PowerShell Gallery, you can use the following command:

```powershell
Install-PSResource -Name {{ NAME }}
Import-Module -Name {{ NAME }}
Install-PSResource -Name Jwt
Import-Module -Name Jwt
```

## Usage
## Commands

Here is a list of example that are typical use cases for the module.

### Example 1: Greet an entity

Provide examples for typical commands that a user would like to do with the module.
The maintained module exports the same JWT commands and alias used by the current package:

```powershell
Greet-Entity -Name 'World'
Hello, World!
ConvertFrom-Base64UrlString
ConvertTo-Base64UrlString
Get-JwtHeader
Get-JwtPayload
New-Jwt
Test-Jwt
Verify-JwtSignature
```

### Example 2
## Usage

Provide examples for typical commands that a user would like to do with the module.
Create and validate an HMAC-signed JWT:

```powershell
Import-Module -Name PSModuleTemplate
```
$header = '{"alg":"HS256","typ":"JWT"}'
$payload = '{"sub":"1234567890","name":"John Doe","admin":true,"iat":1516239022}'
$secret = 'a-string-secret-at-least-256-bits-long'

### Find more examples
$jwt = New-Jwt -Header $header -PayloadJson $payload -Secret $secret
Test-Jwt -jwt $jwt -Secret $secret
```

To find more examples of how to use the module, please refer to the [examples](examples) folder.
Read the header and payload from an existing token:

Alternatively, you can use the Get-Command -Module 'This module' to find more commands that are available in the module.
To find examples of each of the commands you can use Get-Help -Examples 'CommandName'.
```powershell
Get-JwtHeader -jwt $jwt
Get-JwtPayload -jwt $jwt
```

## Documentation
For more information about each command, use PowerShell help:

Link to further documentation if available, or describe where in the repository users can find more detailed documentation about
the module's functions and features.
```powershell
Get-Command -Module Jwt
Get-Help New-Jwt -Full
```

## Contributing

Expand Down
19 changes: 0 additions & 19 deletions examples/General.ps1

This file was deleted.

3 changes: 0 additions & 3 deletions src/README.md

This file was deleted.

Binary file removed src/assemblies/LsonLib.dll
Binary file not shown.
15 changes: 0 additions & 15 deletions src/classes/private/SecretWriter.ps1

This file was deleted.

Loading
Loading