AuthSteem v0.1.0完成
为了解决国内使用 steemit 的种种障碍,也是操碎了心。
已完成功能
- 应用创建
- 应用信息修改
- 应用删除
- 对用户进行授权
- 去除对用户的授权
- 验证用户posting权限
文档
原理
Authsteem
平台会把 authsteem 账号的 posting
权限加入到应用平台的 Steemit
账号的 posting
权限中。
当应用平台需要用户授权的时候,Authsteem
平台会把应用平台的 Steemit
账号的 posting
权限加入到用户的 Steemit
账号中去,并且 Authsteem
平台会给用户产生一个该应用平台的 token
,该 token
会下发给应用平台。
当应用平台需要用户发文等 Posting
权限操作的时候,有两种方式可以签发数据,一个是通过应用平台的 Steemit
账号的 Posting
权限的私钥签发,一个是通过 token
发送相关数据给 Authsteem
平台的指定接口完成相关功能(未开发)。
创建应用
- 需要自行准备一个
Steemit
账号。该账号会用作应用平台的签名使用,以及向用户展示。 - 访问 https://connect.steemtools.top ,点击首页的“注册”链接
- 使用准备好的
Steemit
账号的用户名和Active权限私钥,进行授权 - 授权成功后会自动跳转到管理界面,该界面可以修改你的应用信息,这些信息会在以后的授权页面中显示。另外还有一个
secret
需要保存好,不要泄露,这个secret
是用来对Authsteem和应用之间交互数据进行签名的。
验证用户登录
构建如下URL:
https://connect.steemtools.top/auth?app_id=[app_username]&scope=login
其中app_id
为你在创建应用时使用的Steemit
账号的username
,scope
设置为login
。
如果是在测试环境,需要Authsteem调用你的测试回调地址,请加上
&test=1
参数
让用户授权Posting给应用
构建如下URL:
https://connect.steemtools.top/auth?app_id=[app_username]&scope=posting
其中app_id
为你在创建应用时使用的Steemit
账号的username
,scope
设置为posting
。
如果是在测试环境,需要Authsteem调用你的测试回调地址,请加上
&test=1
参数
回调地址
Authsteem
会在完成链上操作后,发送数据到应用指定的Callback
地址。
其中以下数据是必有的:
- username => 当前用户的steem账号的username
- token => 当前用户在Authsteem平台的token
- sign => 当前数据的签名
- scope => 调用方法的类型
回调地址的签名算法
sign = md5(username + token + secret)
Callback
地址拿到数据后,需要拼接username
、token
、secret
,其中username
和token
是接收到的数据,secret
在应用控制面板里可以获取到。
问题
如果有问题,请到 https://github.com/ety001/authsteem/issues 发帖。
项目地址
https://github.com/ety001/authsteem
OVER!
感谢你的阅读,我是中文区见证人之一,欢迎通过 SteemConnect 来给我投票,或者打开 https://steemit.com/~witnesses/ 页面,输入 ety001 进行投票。
中文区的见证人目前有:
支持一下他们(按字母顺序),一人可以有30票:
Thank you for reading. I'm a witness. I would really appreciate your witness vote! You can vote by SteemConnect. Or open https://steemit.com/~witnesses page, input ety001 to vote.
恭喜你!您的这篇文章入选 @justyy 今日 (2019-06-25) 榜单 【优秀的文章】, 回复本条评论24小时内领赏,点赞本评论将支持 @dailychina 并增加将来您的奖赏。
@justyy 是CN区的见证人,请支持他,给他投票,感谢!
Congratulations! This post has been selected by @justyy as today's (2019-06-25) 【Good Posts】, Steem On! Reply to this message in 24 hours to get rewards. Upvote this comment to support the @dailychina and increase your future rewards! ^_^
SteemIt 工具、API接口、机器人和教程
SteemIt Tools, Bots, APIs and Tutorial
*Join cnsteem Discord channel: *https://discord.gg/SnNaaYS
厉害了
Congratulations @ety001! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :
You can view your badges on your Steem Board and compare to others on the Steem Ranking
If you no longer want to receive notifications, reply to this comment with the word
STOP
To support your work, I also upvoted your post!
Do not miss the last post from @steemitboard:
Vote for @Steemitboard as a witness to get one more award and increased upvotes!
非常不错
Thank you so much for participating in the Partiko Delegation Plan Round 1! We really appreciate your support! As part of the delegation benefits, we just gave you a 3.00% upvote! Together, let’s change the world!