Sitelet https://web.archive.org/web/20260507023407/https://github.com/labstack/echo/issues/1608
Skip to content

Is there a way to use JWT with asymmetric cyphers in Echo v4? #1608

@andrei-dascalu

Description

@andrei-dascalu

Issue Description

I am trying to use Echo framework to create an API that is protected by JWT. I'm issuing JWT's using ithub.com/dgrijalva/jwt-go with jwt.SigningMethodES512 however in echo v4 middleware I only see middleware.AlgorithmHS256 available for signing method configuration.

A while back I saw a PR introducing RS256, but that doesn't seem to be available anymore.

Is there any way to use asymmetric cyphers for JWT ? I've tried simply passing "ES512" and the public key as SigningKey (which is confusing since for asymmetric cyphers the JWT is signed with private key but verified by public key).

Expected behaviour

Echo middleware is able to validate JWT's signed with asymmetric cyphers (such as RSxxx and ESxxx).

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions