我找不到代码示例的 Maven 依赖项:Keys.hmacShaKeyFor(...);

问题描述 投票:0回答:2

我想获取此代码示例的 Maven 依赖关系:

Keys.hmacShaKeyFor(signingKeySecret.getBytes());

通常我应该处于这种依赖关系中,但它似乎不存在:

<dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt</artifactId>
            <version>0.9.1</version>
</dependency>

有人知道它在哪里吗?

谢谢你

spring maven security jwt key
2个回答
2
投票

它是

jjwt-impl

的一部分
<dependency>
    <groupId>io.jsonwebtoken</groupId>
    <artifactId>jjwt-impl</artifactId>
    <version>0.11.2</version>
</dependency>

0
投票

我也有同样的问题。我有 jjwt-impl 0.11.5 版本,但仍然无法工作。

Keys
没有给我 jjwt-impl 的任何选项。

        <dependency>
            <groupId>io.jsonwebtoken</groupId>
            <artifactId>jjwt-impl</artifactId>
            <version>0.11.5</version>
            <scope>runtime</scope>
        </dependency>
© www.soinside.com 2019 - 2024. All rights reserved.