sp3269 / posh-jwt Goto Github PK
View Code? Open in Web Editor NEWJWT (JSON Web Tokens) implementation in Powershell
License: MIT License
JWT (JSON Web Tokens) implementation in Powershell
License: MIT License
The signing code errors out under a number of conditions:
Need to implement new signing, error handling
Hi, according to your docs:
The module provides two main functions: New-Jwt, Test-Jwt (also aliased to Verify-JwtSignature), as well as service functions - ConvertFrom-Base64UrlString, ConvertFrom-Base64UrlString, Get-JwtHeader, and Get-JwtPayload. Descriptions and help for each are available by running Get-Help.
In terms of cmdlets, the ones highlighted don't show up, also they're the same?
Cheers.
I am looking to generate the JWT token to access DocuSign API, but unable to do so, as it isn't clear to me how to perform the RSASHA256 encoding (as shown in the snippet attached) [RSASHA256(
base64UrlEncode(header) + "." +
base64UrlEncode(payload),PUBLICKEY, PRIVATEKEY
Can you please assist?
I am looking to do this in PowerShell
#No error to create New-Object X509Certificate2
$cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2("\131519.p12","notasecret")
#Got error when create the RS256JWT
$jwt = New-Jwt -Cert $cert -PayloadJson $payLoad -Verbose
Signing with SHA256 and Pkcs1 padding failed using private key
System.Security.Cryptography.RSACryptoServiceProvider
At C:\Program Files\WindowsPowerShell\Modules\JWT\1.9.0\JWT.psm1:282 char:25
... catch { throw "Signing with SHA256 and Pkcs1 padding failed using ...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (Signing with SH...ServiceProvider:String) [], RuntimeExcepti
on
+ FullyQualifiedErrorId : Signing with SHA256 and Pkcs1 padding failed using private key System.Security.
Cryptography.RSACryptoServiceProvider
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.