unix命令行jwt生成器。

jwt-generator的Python项目详细描述


基于rsa私钥的简单命令行jwt令牌生成器。

默认情况下,它将打印带有iss、nbf和exp集的jwt令牌,该令牌已签名 通过~/.ssh/id_rsa中的私钥。:

iss - will be set to the current user name
nbf - will be set to 1 minute in the past
exp - will be set to 30 minutes in the future.

可以覆盖命令行上的默认设置。

选项

--issuer TEXTof the token
--not-before INTEGER
number of seconds before now the token is no longer valid
--expires-after INTEGER
number of seconds after which the token is no longer valid
--private-key-file PATH
the private key file to sign the token with
-A, --authorization-header
print authorization header bearer token
--helpShow this message and exit.

示例

要发送带有curl的授权承载令牌,请键入:

curl -H "$(jwt-generator -A)" https://httpbin.org/headers

在MacOS上安装

要安装MacOS,由于依赖于加密技术,您可能会遇到麻烦。类型:

export LDFLAGS="-L/usr/local/opt/openssl/lib"
export CPPFLAGS="-I/usr/local/opt/openssl/include"
export PKG_CONFIG_PATH="/usr/local/opt/openssl/lib/pkgconfig"

在执行pip之前,请安装jwt generator。有关详细信息,请参见https://github.com/pyca/cryptography/issues/2692

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java从提供的列表中获取非重复值   java为什么Thymeleaf从HashMap返回字符串?   java将矩阵推到窗口的中心   java如何包含webapp_配置。txt到播放的dist-zip?   java实现产品密钥   WebSphereJava。lang.UnsupportedClassVersionError:JVMCFRE003错误的主要版本;class=org/slf4j/impl/StaticLoggerBinder,偏移量=6   使用java创建动态树结构   java为什么JVM在一次繁忙的旋转暂停后,会对同一代码块显示更多的延迟?   java无法使用distrolessdebug访问jarfile docker   java JMeter如何将多行响应数据传递给ForEach控制器请求   java空指针异常碎片活动   java改变JFileChooser的外观   性能Java位集:高效地查找所有真实位?   java可扩展的recyclerview实现