matelang / jwt-go-aws-kms Goto Github PK
View Code? Open in Web Editor NEWAWS KMS adapter for https://github.com/golang-jwt/jwt GoLang Json Web Token(JWT) Library
License: MIT License
AWS KMS adapter for https://github.com/golang-jwt/jwt GoLang Json Web Token(JWT) Library
License: MIT License
Error:
cannot use jwtkms.SigningMethodPS256 (variable of type *jwtkms.KMSSigningMethod) as "github.com/golang-jwt/jwt/v4".SigningMethod value in argument to jwt.NewWithClaims: *jwtkms.KMSSigningMethod does not implement "github.com/golang-jwt/jwt/v4".SigningMethod (wrong type for method Sign)
have Sign(string, interface{}) ([]byte, error)
want Sign(string, interface{}) (string, error)
Version: github.com/matelang/jwt-go-aws-kms/v2 v2.0.0-20230418135646-4d0c7db30e97
I'm trying to use the library with go-jwt/v4 but due to different signature of KMSSigningMethod in v2 it's not working.
Is there a way to go mod tidy import version 1.1.0 of library?
i think there is an error on version of go.mod in v1.
https://go.dev/doc/modules/version-numbers
require (
github.com/aws/aws-sdk-go-v2/config v1.18.27
github.com/aws/aws-sdk-go-v2/service/kms v1.22.2
github.com/golang-jwt/jwt/v4 v4.5.0
github.com/matelang/jwt-go-aws-kms/v2 v1.1.0
)
❯ go mod tidy
go: errors parsing go.mod:
/Users/fams/src/jws-signer/go.mod:9:2: require github.com/matelang/jwt-go-aws-kms/v2: version "v1.1.0" invalid: should be v2, not v1
I've tried to use this with a RSA key stored in AWS KMS but get a key is invalid error. I can manually sign the tokens directly with KMS so I know the key isn't the problem.
Hi,
Is there any plan to do support for V5 of the go-jwt lib? I know it's only in beta at the moment.
Thanks
Hey @matelang :D
Thinking if it's good to release a new tag containing PSS support? :D
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.