轻松生成用于Phenix平台的安全摘要令牌
phenix-edge-auth的Python项目详细描述
Python的Phenix EdgeAuth摘要标记
轻松生成用于Phenix平台的安全摘要令牌,无需任何联网活动。在
安装
要使用pip安装Phenix边缘授权摘要令牌,请执行以下操作:
$ pip install phenix-edge-auth
测试
^{pr2}$示例
fromedgeauth.token_builderimportTokenBuilder# Create a token to access a channeltoken=TokenBuilder().with_application_id('my-application-id') \ .with_secret('my-secret') \ .expires_in_seconds(3600) \ .for_channel('us-northeast#my-application-id#my-channel.1345') \ .build()
命令行示例
显示帮助信息:
$ edgeauth --help
为通道访问创建令牌:
$ edgeauth --application_id "my-application-id" --secret "my-secret" --expires_in_seconds 3600 --channel "us-northeast#my-application-id#my-channel.1345"
- 项目
标签: