Skip to content

🌟 [Major]: JWT v2 overhaul delivers a new typed, standards-aligned interface - #26

Merged
Marius Storhaug (MariusStorhaug) merged 35 commits into
mainfrom
feat/13-implement-jwt-module
Aug 3, 2026
Merged

🌟 [Major]: JWT v2 overhaul delivers a new typed, standards-aligned interface#26
Marius Storhaug (MariusStorhaug) merged 35 commits into
mainfrom
feat/13-implement-jwt-module

Conversation

@MariusStorhaug

@MariusStorhaugMarius Storhaug (MariusStorhaug) commented May 12, 2026

Copy link
Copy Markdown
Member

Jwt v2 is a full overhaul of token creation, parsing, validation, and key handling. The user-facing interface is now type-first, standards-aligned, and designed for safer default behavior and clearer composition in automation.

Breaking Changes

The v1 JWT surface has been replaced by the v2 typed interface.

Existing integrations that depended on legacy command signatures or output shapes must migrate to the v2 command contracts.

Generated-key bundle output from New-Jwt was removed in favor of a stable [Jwt] return shape; key ownership/export should use New-JwtSigningKey.

New: Typed, composable JWT object model

Commands now center on typed objects ([Jwt], [JwtHeader], [JwtPayload], [JwtKey], [JwtKeySet]) so callers can work directly with structured data instead of string-only flows.

This includes stable formatting/type metadata for better terminal output and safer default key display behavior.

Changed: Safer JOSE/JWT validation behavior

Test-Jwt now enforces JOSE critical-header (crit) semantics when present.

Tokens declaring crit require explicit allow-listing via -AllowedCriticalHeader and fail closed on unsupported or malformed critical declarations.

No crit header is required for normal validation flows.

Changed: Clearer key-conversion behavior

ConvertFrom-JwtKey now returns raw byte[] for kty=oct by default.

When an HMAC instance is needed, callers can explicitly request it with -AsHmac -Algorithm HS256|HS384|HS512.

Changed: CI/release safety alignment

Process-PSModule workflow secret forwarding now uses explicit secret mapping instead of secrets: inherit.

Technical Details

  • Implemented JOSE crit enforcement in Test-Jwt and added CriticalHeaders to -Detailed checks.
  • Standardized New-Jwt output contract to [Jwt] across parameter sets.
  • Updated oct JWK conversion to explicit/algorithm-safe behavior.
  • Added New-JwtSigningKey and aligned examples/docs around explicit key ownership.
  • Added class docs plus type/format metadata for safer default object display.
  • Split test coverage into integration + per-command unit tests and expanded protocol/security cases.
  • Final CI loop fixes included PowerShell lint cleanup (GenerateKey usage) and UTF-8 BOM normalization on edited PowerShell files.
  • Full suite is green locally (113 tests passed).
Related issues

@MariusStorhaugMarius Storhaug (MariusStorhaug) changed the title Draft: JWT v2 implementation🌟 [Major]: JWT v2 — full JOSE spec coverage with typed objects, JWK round-trip, and algorithm-confusion protectionMay 12, 2026
@MariusStorhaugMarius Storhaug (MariusStorhaug) added the Major Breaking changes that bump the major version label May 12, 2026
@github-actions

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNFail ❌
NATURAL_LANGUAGEPass ✅
POWERSHELLFail ❌
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

Super-linter detected linting errors

For more information, see the GitHub Actions workflow run

Powered by Super-linter

MARKDOWN
/github/workspace/README.md:20:113 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
POWERSHELL

�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidLongLines Warning JwtPayload 38 Line exceeds
.ps1 the configure
d maximum len
gth of 150 ch
aracters
PSAvoidLongLines Warning JwtPayload 39 Line exceeds
.ps1 the configure
d maximum len
gth of 150 ch
aracters
PSAvoidLongLines Warning JwtPayload 40 Line exceeds
.ps1 the configure
d maximum len
gth of 150 ch
aracters
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information ConvertFro 30 The cmdlet 'C
m-Base64Ur onvertFrom-Ba
lString.ps se64UrlString
1 ' returns an
object of typ
e 'System.Obj
ect[]' but th
is type is no
t declared in
the OutputTy
pe attribute.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidLongLines Warning New-Jwt.ps 103 Line exceeds
1 the configure
d maximum len
gth of 150 ch
aracters
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information Resolve-Jw 98 The cmdlet 'R
tKey.ps1 esolve-JwtKey
' returns an
object of typ
e 'System.Sec
urity.Cryptog
raphy.RSA' bu
t this type i
s not declare
d in the Outp
utType attrib
ute.
PSUseOutputTypeCorrectly Information Resolve-Jw 107 The cmdlet 'R
tKey.ps1 esolve-JwtKey
' returns an
object of typ
e 'System.Sec
urity.Cryptog
raphy.HMACSHA
256' but this
type is not
declared in t
he OutputType
attribute.
PSUseOutputTypeCorrectly Information Resolve-Jw 116 The cmdlet 'R
tKey.ps1 esolve-JwtKey
' returns an
object of typ
e 'System.Sec
urity.Cryptog
raphy.HMACSHA
256' but this
type is not
declared in t
he OutputType
attribute.
PSUseOutputTypeCorrectly Information Resolve-Jw 135 The cmdlet 'R
tKey.ps1 esolve-JwtKey
' returns an
object of typ
e 'System.Sec
urity.Cryptog
raphy.ECDsa'
but this type
is not decla
red in the Ou
tputType attr
ibute.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidLongLines Warning Test-Jwt.p 109 Line exceeds
s1 the configure
d maximum len
gth of 150 ch
aracters
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information Test-JwtCl 100 The cmdlet 'T
aim.ps1 est-JwtClaim'
returns an o
bject of type
'System.Obje
ct[]' but thi
s type is not
declared in
the OutputTyp
e attribute.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidUsingConvertToSecureStringWi Error Jwt.Tests. 71 File 'Jwt.Tes
thPlainText ps1 ts.ps1' uses
ConvertTo-Sec
ureString wit
h plaintext.
This will exp
ose secure in
formation. En
crypted stand
ard strings s
hould be used
instead.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information ConvertFro 49 The cmdlet 'C
m-JwtKey.p onvertFrom-Jw
s1 tKey' returns
an object of
type 'System
.Security.Cry
ptography.RSA
' but this ty
pe is not dec
lared in the
OutputType at
tribute.
PSUseOutputTypeCorrectly Information ConvertFro 71 The cmdlet 'C
m-JwtKey.p onvertFrom-Jw
s1 tKey' returns
an object of
type 'System
.Security.Cry
ptography.ECD
sa' but this
type is not d
eclared in th
e OutputType
attribute.
PSUseOutputTypeCorrectly Information ConvertFro 75 The cmdlet 'C
m-JwtKey.p onvertFrom-Jw
s1 tKey' returns
an object of
type 'System
.Security.Cry
ptography.HMA
CSHA256' but
this type is
not declared
in the Output
Type attribut
e.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information Get-JwtCla 87 The cmdlet 'G
im.ps1 et-JwtClaim'
returns an ob
ject of type
'System.Colle
ctions.Specia
lized.Ordered
Dictionary' b
ut this type
is not declar
ed in the Out
putType attri
bute.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
TypeNotFound Information Jwt.ps1 2 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 3 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 10 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 10 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 13 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 14 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 18 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 18 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 21 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 22 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 27 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 28 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.

@MariusStorhaugMarius Storhaug (MariusStorhaug) changed the title 🌟 [Major]: JWT v2 — full JOSE spec coverage with typed objects, JWK round-trip, and algorithm-confusion protection🌟 [Major]: JWT module rewrite covering the full JWS half of JOSEMay 12, 2026
@github-actions

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNFail ❌
NATURAL_LANGUAGEFail ❌
POWERSHELLFail ❌
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

Super-linter detected linting errors

For more information, see the GitHub Actions workflow run

Powered by Super-linter

MARKDOWN
/github/workspace/README.md:20:114 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:22:11 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:23:62 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:23:106 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:24:118 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:32:116 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:44:63 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
NATURAL_LANGUAGE

/github/workspace/README.md
163:44 ✓ error Incorrect term: “end to end”, use “end-to-end” instead terminology
✖ 1 problem (1 error, 0 warnings, 0 infos)
✓ 1 fixable problem.
Try to run: $ textlint --fix [file]
POWERSHELL

�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
TypeNotFound Information JwtKeySet. 2 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 7 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 15 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 17 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 19 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 33 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidLongLines Warning JwtPayload 38 Line exceeds
.ps1 the configure
d maximum len
gth of 150 ch
aracters
PSAvoidLongLines Warning JwtPayload 39 Line exceeds
.ps1 the configure
d maximum len
gth of 150 ch
aracters
PSAvoidLongLines Warning JwtPayload 40 Line exceeds
.ps1 the configure
d maximum len
gth of 150 ch
aracters
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information New-JwtHma 22 The cmdlet 'N
c.ps1 ew-JwtHmac' r
eturns an obj
ect of type '
System.Securi
ty.Cryptograp
hy.HMACSHA256
' but this ty
pe is not dec
lared in the
OutputType at
tribute.
PSUseOutputTypeCorrectly Information New-JwtHma 23 The cmdlet 'N
c.ps1 ew-JwtHmac' r
eturns an obj
ect of type '
System.Securi
ty.Cryptograp
hy.HMACSHA384
' but this ty
pe is not dec
lared in the
OutputType at
tribute.
PSUseOutputTypeCorrectly Information New-JwtHma 24 The cmdlet 'N
c.ps1 ew-JwtHmac' r
eturns an obj
ect of type '
System.Securi
ty.Cryptograp
hy.HMACSHA512
' but this ty
pe is not dec
lared in the
OutputType at
tribute.
PSUseShouldProcessForStateChangingF Warning New-JwtHma 1 Function 'New
unctions c.ps1 -JwtHmac' has
verb that co
uld change sy
stem state. T
herefore, the
function has
to support '
ShouldProcess
'.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information Resolve-Jw 135 The cmdlet 'R
tKey.ps1 esolve-JwtKey
' returns an
object of typ
e 'System.Sec
urity.Cryptog
raphy.RSA' bu
t this type i
s not declare
d in the Outp
utType attrib
ute.
PSUseOutputTypeCorrectly Information Resolve-Jw 191 The cmdlet 'R
tKey.ps1 esolve-JwtKey
' returns an
object of typ
e 'System.Sec
urity.Cryptog
raphy.ECDsa'
but this type
is not decla
red in the Ou
tputType attr
ibute.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information Get-JwtCla 88 The cmdlet 'G
im.ps1 et-JwtClaim'
returns an ob
ject of type
'System.Colle
ctions.Specia
lized.Ordered
Dictionary' b
ut this type
is not declar
ed in the Out
putType attri
bute.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information Test-JwtCl 100 The cmdlet 'T
aim.ps1 est-JwtClaim'
returns an o
bject of type
'System.Obje
ct[]' but thi
s type is not
declared in
the OutputTyp
e attribute.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information ConvertFro 30 The cmdlet 'C
m-Base64Ur onvertFrom-Ba
lString.ps se64UrlString
1 ' returns an
object of typ
e 'System.Obj
ect[]' but th
is type is no
t declared in
the OutputTy
pe attribute.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information ConvertFro 49 The cmdlet 'C
m-JwtKey.p onvertFrom-Jw
s1 tKey' returns
an object of
type 'System
.Security.Cry
ptography.RSA
' but this ty
pe is not dec
lared in the
OutputType at
tribute.
PSUseOutputTypeCorrectly Information ConvertFro 71 The cmdlet 'C
m-JwtKey.p onvertFrom-Jw
s1 tKey' returns
an object of
type 'System
.Security.Cry
ptography.ECD
sa' but this
type is not d
eclared in th
e OutputType
attribute.
PSUseOutputTypeCorrectly Information ConvertFro 75 The cmdlet 'C
m-JwtKey.p onvertFrom-Jw
s1 tKey' returns
an object of
type 'System
.Security.Cry
ptography.HMA
CSHA256' but
this type is
not declared
in the Output
Type attribut
e.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidLongLines Warning New-Jwt.ps 114 Line exceeds
1 the configure
d maximum len
gth of 150 ch
aracters
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidLongLines Warning Test-Jwt.p 109 Line exceeds
s1 the configure
d maximum len
gth of 150 ch
aracters
PSAvoidLongLines Warning Test-Jwt.p 121 Line exceeds
s1 the configure
d maximum len
gth of 150 ch
aracters
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
TypeNotFound Information Jwt.ps1 2 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 3 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 10 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 10 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 13 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 14 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 18 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 18 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 21 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 22 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 27 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 28 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidLongLines Warning Jwt.Tests. 484 Line exceeds
ps1 the configure
d maximum len
gth of 150 ch
aracters
PSAvoidUsingConvertToSecureStringWi Error Jwt.Tests. 71 File 'Jwt.Tes
thPlainText ps1 ts.ps1' uses
ConvertTo-Sec
ureString wit
h plaintext.
This will exp
ose secure in
formation. En
crypted stand
ard strings s
hould be used
instead.

@github-actions

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNFail ❌
NATURAL_LANGUAGEFail ❌
POWERSHELLFail ❌
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

Super-linter detected linting errors

For more information, see the GitHub Actions workflow run

Powered by Super-linter

MARKDOWN
/github/workspace/README.md:20:114 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:22:11 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:23:62 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:23:106 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:24:118 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:32:116 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:44:63 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
NATURAL_LANGUAGE

/github/workspace/README.md
163:44 ✓ error Incorrect term: “end to end”, use “end-to-end” instead terminology
✖ 1 problem (1 error, 0 warnings, 0 infos)
✓ 1 fixable problem.
Try to run: $ textlint --fix [file]
POWERSHELL

�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
TypeNotFound Information JwtKeySet. 2 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 7 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 15 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 17 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 19 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 33 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidLongLines Warning JwtPayload 38 Line exceeds
.ps1 the configure
d maximum len
gth of 150 ch
aracters
PSAvoidLongLines Warning JwtPayload 39 Line exceeds
.ps1 the configure
d maximum len
gth of 150 ch
aracters
PSAvoidLongLines Warning JwtPayload 40 Line exceeds
.ps1 the configure
d maximum len
gth of 150 ch
aracters
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information New-JwtHma 22 The cmdlet 'N
c.ps1 ew-JwtHmac' r
eturns an obj
ect of type '
System.Securi
ty.Cryptograp
hy.HMACSHA256
' but this ty
pe is not dec
lared in the
OutputType at
tribute.
PSUseOutputTypeCorrectly Information New-JwtHma 23 The cmdlet 'N
c.ps1 ew-JwtHmac' r
eturns an obj
ect of type '
System.Securi
ty.Cryptograp
hy.HMACSHA384
' but this ty
pe is not dec
lared in the
OutputType at
tribute.
PSUseOutputTypeCorrectly Information New-JwtHma 24 The cmdlet 'N
c.ps1 ew-JwtHmac' r
eturns an obj
ect of type '
System.Securi
ty.Cryptograp
hy.HMACSHA512
' but this ty
pe is not dec
lared in the
OutputType at
tribute.
PSUseShouldProcessForStateChangingF Warning New-JwtHma 1 Function 'New
unctions c.ps1 -JwtHmac' has
verb that co
uld change sy
stem state. T
herefore, the
function has
to support '
ShouldProcess
'.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information Resolve-Jw 135 The cmdlet 'R
tKey.ps1 esolve-JwtKey
' returns an
object of typ
e 'System.Sec
urity.Cryptog
raphy.RSA' bu
t this type i
s not declare
d in the Outp
utType attrib
ute.
PSUseOutputTypeCorrectly Information Resolve-Jw 191 The cmdlet 'R
tKey.ps1 esolve-JwtKey
' returns an
object of typ
e 'System.Sec
urity.Cryptog
raphy.ECDsa'
but this type
is not decla
red in the Ou
tputType attr
ibute.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information Get-JwtCla 88 The cmdlet 'G
im.ps1 et-JwtClaim'
returns an ob
ject of type
'System.Colle
ctions.Specia
lized.Ordered
Dictionary' b
ut this type
is not declar
ed in the Out
putType attri
bute.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information Test-JwtCl 100 The cmdlet 'T
aim.ps1 est-JwtClaim'
returns an o
bject of type
'System.Obje
ct[]' but thi
s type is not
declared in
the OutputTyp
e attribute.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information ConvertFro 30 The cmdlet 'C
m-Base64Ur onvertFrom-Ba
lString.ps se64UrlString
1 ' returns an
object of typ
e 'System.Obj
ect[]' but th
is type is no
t declared in
the OutputTy
pe attribute.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSUseOutputTypeCorrectly Information ConvertFro 49 The cmdlet 'C
m-JwtKey.p onvertFrom-Jw
s1 tKey' returns
an object of
type 'System
.Security.Cry
ptography.RSA
' but this ty
pe is not dec
lared in the
OutputType at
tribute.
PSUseOutputTypeCorrectly Information ConvertFro 71 The cmdlet 'C
m-JwtKey.p onvertFrom-Jw
s1 tKey' returns
an object of
type 'System
.Security.Cry
ptography.ECD
sa' but this
type is not d
eclared in th
e OutputType
attribute.
PSUseOutputTypeCorrectly Information ConvertFro 75 The cmdlet 'C
m-JwtKey.p onvertFrom-Jw
s1 tKey' returns
an object of
type 'System
.Security.Cry
ptography.HMA
CSHA256' but
this type is
not declared
in the Output
Type attribut
e.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidLongLines Warning New-Jwt.ps 114 Line exceeds
1 the configure
d maximum len
gth of 150 ch
aracters
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidLongLines Warning Test-Jwt.p 109 Line exceeds
s1 the configure
d maximum len
gth of 150 ch
aracters
PSAvoidLongLines Warning Test-Jwt.p 121 Line exceeds
s1 the configure
d maximum len
gth of 150 ch
aracters
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
PSAvoidLongLines Warning Jwt.Tests. 484 Line exceeds
ps1 the configure
d maximum len
gth of 150 ch
aracters
PSAvoidUsingConvertToSecureStringWi Error Jwt.Tests. 71 File 'Jwt.Tes
thPlainText ps1 ts.ps1' uses
ConvertTo-Sec
ureString wit
h plaintext.
This will exp
ose secure in
formation. En
crypted stand
ard strings s
hould be used
instead.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
TypeNotFound Information Jwt.ps1 2 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 3 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 10 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 10 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 13 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 14 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 18 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 18 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 21 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 22 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 27 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 28 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.

…, add Base64Url tests
- README.md: Fix MD060 table column alignment; correct 'end to end' to 'end-to-end'
- JwtPayload.ps1: Extract $autoNull variable to shorten lines below 150 chars
- New-Jwt.ps1: Break long if-condition into parenthesized $shouldDispose expression
- Test-Jwt.ps1: Extract $supportedAlgs array; use $allowed for dynamic error message;
break long lines and fix finally-block indentation
- New-JwtHmac.ps1: Suppress PSUseShouldProcessForStateChangingFunctions, PSUseOutputTypeCorrectly
- Resolve-JwtKey.ps1, Test-JwtClaim.ps1, ConvertFrom-Base64UrlString.ps1, ConvertFrom-JwtKey.ps1,
Get-JwtClaim.ps1: Suppress PSUseOutputTypeCorrectly (polymorphic return types)
- Jwt.Tests.ps1: Suppress PSAvoidUsingConvertToSecureStringWithPlainText and PSAvoidLongLines;
add Base64Url helper tests (ConvertFrom-Base64UrlString coverage)
@github-actions

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNFail ❌
NATURAL_LANGUAGEPass ✅
POWERSHELLFail ❌
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

Super-linter detected linting errors

For more information, see the GitHub Actions workflow run

Powered by Super-linter

MARKDOWN
/github/workspace/README.md:23:68 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:23:146 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:32:152 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:38:146 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:39:146 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
/github/workspace/README.md:42:146 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
POWERSHELL

�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
TypeNotFound Information JwtKeySet. 2 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 7 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 15 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 17 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 19 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 33 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
TypeNotFound Information Jwt.ps1 2 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 3 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 10 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 10 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 13 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 14 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 18 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 18 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 21 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 22 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 27 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 28 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.

@github-actions

Copy link
Copy Markdown

Super-linter summary

LanguageValidation result
CHECKOVPass ✅
GITHUB_ACTIONSPass ✅
GITLEAKSPass ✅
GIT_MERGE_CONFLICT_MARKERSPass ✅
MARKDOWNFail ❌
NATURAL_LANGUAGEPass ✅
POWERSHELLFail ❌
PRE_COMMITPass ✅
SPELL_CODESPELLPass ✅
TRIVYPass ✅
YAMLPass ✅

Super-linter detected linting errors

For more information, see the GitHub Actions workflow run

Powered by Super-linter

MARKDOWN
/github/workspace/README.md:23:68 error MD060/table-column-style Table column style [Table pipe does not align with header for style "aligned"]
POWERSHELL

�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
TypeNotFound Information JwtKeySet. 2 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 7 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 15 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 17 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 19 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
TypeNotFound Information JwtKeySet. 33 Ignoring 'Typ
ps1 eNotFound' pa
rse error on
type 'JwtKey'
. Check if th
e specified t
ype is correc
t. This can a
lso be due th
e type not be
ing known at
parse time du
e to types im
ported by 'us
ing' statemen
ts.
�[32;1mRuleName �[0m�[32;1m Severity �[0m�[32;1m ScriptName�[0m�[32;1m Line �[0m�[32;1m Message�[0m
�[32;1m-------- �[0m �[32;1m-------- �[0m �[32;1m----------�[0m �[32;1m---- �[0m �[32;1m-------�[0m
TypeNotFound Information Jwt.ps1 2 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 3 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 10 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 10 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 13 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 14 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 18 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 18 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.
TypeNotFound Information Jwt.ps1 21 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 22 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtBase
64Url'. Check
if the speci
fied type is
correct. This
can also be
due the type
not being kno
wn at parse t
ime due to ty
pes imported
by 'using' st
atements.
TypeNotFound Information Jwt.ps1 27 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtHead
er'. Check if
the specifie
d type is cor
rect. This ca
n also be due
the type not
being known
at parse time
due to types
imported by
'using' state
ments.
TypeNotFound Information Jwt.ps1 28 Ignoring 'Typ
eNotFound' pa
rse error on
type 'JwtPayl
oad'. Check i
f the specifi
ed type is co
rrect. This c
an also be du
e the type no
t being known
at parse tim
e due to type
s imported by
'using' stat
ements.

@MariusStorhaugMarius Storhaug (MariusStorhaug) changed the title 🌟 [Major]: JWT module rewrite covering the full JWS half of JOSEHarden JOSE validation and standardize Jwt command contractsJul 18, 2026
@MariusStorhaugMarius Storhaug (MariusStorhaug) changed the title Harden JOSE validation and standardize Jwt command contracts🪲 [Fix]: JWT signing and validation behavior is now safer and more predictableJul 18, 2026
@MariusStorhaugMarius Storhaug (MariusStorhaug) changed the title 🪲 [Fix]: JWT signing and validation behavior is now safer and more predictable🌟 [Major]: JWT v2 overhaul delivers a new typed, standards-aligned interfaceJul 19, 2026
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
## Summary
Targets `feat/13-implement-jwt-module` and adds production-level
edge-case coverage to the JWT v2 integration suite. While adding tests,
it also fixes a regression where `New-JwtSigningKey -Algorithm HS*`
returned `[object[]]` instead of `[byte[]]`, breaking `New-Jwt
-GenerateKey` for HMAC algorithms.
## What changed
### Tests (`tests/Integration.Jwt.Tests.ps1`)
Added a new `Production-level edge cases` context covering:
- `Test-Jwt -Detailed` reports failed signature and failed claim checks.
- `New-Jwt -GenerateKey` produces valid tokens for HS256, RS256, and
ES256.
- `ConvertFrom-Jwt` accepts a `SecureString` token.
- `Test-Jwt` returns `$false` for an empty signature segment on signed
algorithms.
- `New-Jwt` parameter validation rejects non-hashtable payloads.
- `Test-Jwt` parameter validation rejects `$null` tokens.
- Verbose output does not leak payload secrets or key material.
### Bug fix (`src/functions/public/Keys/New-JwtSigningKey.ps1`)
PowerShell unwraps `[byte[]]` to `[object[]]` when returned through an
untyped variable. The HS* branch now returns `,$bytes` so the byte-array
type is preserved, allowing `New-Jwt -Algorithm HS256 -GenerateKey` to
sign and verify correctly.
### CI
Bumped the reusable workflow pin to Process-PSModule v6.1.15 while
preserving the explicit `TestData` mapping required by the reusable
workflow's secrets interface.
## Verification
```powershell
Import-Module Pester -RequiredVersion 6.0.1 -Force
$config = New-PesterConfiguration
$config.Run.Path = 'tests'
Invoke-Pester -Configuration $config
```
Result: **123 passed, 0 failed** (1 skipped: optional Azure Key Vault
test).
## Related
Contributes to #26 (JWT v2 overhaul).
---
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
- Remove non-existent -NoEnumerateByteArray parameter from ConvertTo-Base64UrlString call.
- Use the $AccessToken parameter in Authorization headers instead of a literal placeholder.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Wrap RSA/RSASSA-PSS and ECDSA VerifyData calls in try/catch so malformed
signatures return $false instead of propagating CryptographicException.
This closes a timing/exception oracle that could distinguish malformed
signatures from well-formed-but-invalid ones.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…failures
Test-Jwt -Detailed previously threw terminating exceptions for invalid
alg values and malformed/unsupported crit headers, which prevented
callers from getting the documented structured report. Failures now
populate the corresponding Checks entry and return the report; the
non-Detailed path continues to throw for compatibility.
Adds integration tests for unsupported-algorithm and failed-crit-header
-Detailed output.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
When a SecureString is supplied for an HS* algorithm, decrypt it directly
to a UTF-8 byte array instead of keeping a managed plaintext string in
$Key. This lets the transient string be garbage-collected sooner and
keeps the symmetric key in the canonical byte[] form.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Require a recognized EC curve OID or friendly name before accepting an
ECDsa key for ES256/ES384/ES512 operations. Previously a null OID value
bypassed the curve check; now such keys are rejected. Also ensures the
ephemeral ECDsa instance created from a PEM string is disposed if
ImportFromPem fails, and ConvertTo-JwtKey rejects curves it cannot
map to a supported JWK crv value.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…message
Breaks the exception message string across multiple lines so it stays
under the 150-character PSScriptAnalyzer limit.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Aligns the wrapped EC-curve exception message with the project's
existing multi-line argument indentation style.
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@MariusStorhaug
Marius Storhaug (MariusStorhaug) marked this pull request as ready for review August 3, 2026 03:15
@MariusStorhaug
Marius Storhaug (MariusStorhaug) merged commit aa64677 into mainAug 3, 2026
46 checks passed
@MariusStorhaug
Marius Storhaug (MariusStorhaug) deleted the feat/13-implement-jwt-module branch August 3, 2026 03:15
@github-actions

Copy link
Copy Markdown

✅ New release: PowerShell Gallery - Jwt 2.0.0

@github-actions

Copy link
Copy Markdown

✅ New release: GitHub - Jwt 2.0.0

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

MajorBreaking changes that bump the major version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement JWT creation, parsing, validation, inspection, and JWK functions

2 participants

@MariusStorhaug