create account

The refresh token should be revocable by jakipatryk

View this thread on: hive.blogpeakd.comecency.com
· @jakipatryk · (edited)
$8.52
The refresh token should be revocable
#### Components
This proposal is about the **OAuth2** module of **SteemConnect**. To be more precise - about the `https://steemconnect.com/api/oauth2/token/revoke` endpoint.

#### Proposal
At the moment, there is no way to revoke refresh token via the `https://steemconnect.com/api/oauth2/token/revoke` endpoint. 

Currently, this endpoint revokes the *access token* provided in the *Authorization* header.  I believe it would be really useful for developers to be able to also revoke the *refresh token*.

#### Mockups / Examples
My proposal is to change the current behavior of the `https://steemconnect.com/api/oauth2/token/revoke` endpoint. Here is how it IMO could work:
![proposal headers](https://cdn.utopian.io/posts/96424f941001c5086f945098fe2d11f3c3deimage.png)
![proposal body](https://cdn.utopian.io/posts/302082216a22db2ab6fef8e20b21a912a96eimage.png)

The core concept is that **not** the **access_token** provided in the *Authorization* header is being revoked, but **token** provided in the request's body.

It would enable a developer to implement revoking both **refresh token** and **access token** using the same endpoint.

As you can see, the **headers** section would include:
- *Content-Type: application/x-www-form-urlencoded*
- *Accept: application/json*
- *Authorization: <access_token>*

and **body**:
- *token*, the access_token or refresh_token to revoke
- *token_type_hint*, there developer should specify the type of token (*access_token* or *refresh_token*) provided in the token field

In my opinion, if ***token_type_hint*** was *refresh_token*, SteemConnect **should revoke both** access token and refresh token.

If ***token_type_hint*** was *access_token*, SteemConnect **should only revoke** access token.

For more information check this paper:
- https://tools.ietf.org/pdf/rfc7009.pdf

#### Benefits
With revocable refresh token via the `/api/oauth2/token/revoke` endpoint, a developer would be able to delete all tokens of the user if one didn't need them anymore. My proposal would enable to use `offline` scope more safety.

<br /><hr/><em>Posted on <a href="https://utopian.io/utopian-io/@jakipatryk/refresh-token-is-not-revocable">Utopian.io -  Rewarding Open Source Contributors</a></em><hr/>
πŸ‘  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorjakipatryk
permlinkrefresh-token-is-not-revocable
categoryutopian-io
json_metadata"{"community":"utopian","app":"utopian/1.0.0","format":"markdown","repository":{"id":76603770,"name":"steemconnect","full_name":"steemit/steemconnect","html_url":"https://github.com/steemit/steemconnect","fork":false,"owner":{"login":"steemit"}},"pullRequests":[],"platform":"github","type":"ideas","tags":["utopian-io","steemconnect","dev","steemdev","oauth2"],"users":["jakipatryk"],"links":["https://cdn.utopian.io/posts/96424f941001c5086f945098fe2d11f3c3deimage.png","https://cdn.utopian.io/posts/302082216a22db2ab6fef8e20b21a912a96eimage.png"],"image":["https://cdn.utopian.io/posts/96424f941001c5086f945098fe2d11f3c3deimage.png","https://cdn.utopian.io/posts/302082216a22db2ab6fef8e20b21a912a96eimage.png"],"moderator":{"account":"knowledges","time":"2018-04-01T19:15:41.778Z","flagged":false,"reviewed":true,"pending":false},"questions":[{"question":"Is the project description formal?","answers":[{"value":"Yes it’s straight to the point","selected":true,"score":10},{"value":"Need more description ","selected":false,"score":5},{"value":"Not too descriptive","selected":false,"score":0}],"selected":0},{"question":"Is the language / grammar correct?","answers":[{"value":"Yes","selected":true,"score":20},{"value":"A few mistakes","selected":false,"score":10},{"value":"It's pretty bad","selected":false,"score":0}],"selected":0},{"question":"Was the template followed?","answers":[{"value":"Yes","selected":true,"score":10},{"value":"Partially","selected":false,"score":5},{"value":"No","selected":false,"score":0}],"selected":0},{"question":"Is the suggestion related to any technical issue?","answers":[{"value":"Yes","selected":true,"score":10},{"value":"Partially","selected":false,"score":5},{"value":"No","selected":false,"score":0}],"selected":0},{"question":"Is the suggestion descriptive enough?","answers":[{"value":"Yes","selected":false,"score":5},{"value":"No","selected":true,"score":0}],"selected":1},{"question":"Is there any unrelated content in the suggestion?","answers":[{"value":"No, post solely discusses only talk about the suggestion","selected":true,"score":10},{"value":"Yes, personal intro or other unrelated content","selected":false,"score":0}],"selected":0},{"question":"How would you rate this suggestion as in the impact it could have on the project?","answers":[{"value":"Excellent","selected":false,"score":15},{"value":"Very good","selected":false,"score":12},{"value":"Good","selected":true,"score":8},{"value":"Basic enhancement","selected":false,"score":2}],"selected":2}],"score":7}"
created2018-03-30 14:42:45
last_update2018-04-01 19:15:45
depth0
children6
last_payout2018-04-06 14:42:45
cashout_time1969-12-31 23:59:59
total_payout_value6.194 HBD
curator_payout_value2.326 HBD
pending_payout_value0.000 HBD
promoted0.008 HBD
body_length2,238
author_reputation14,313,610,947,295
root_title"The refresh token should be revocable"
beneficiaries
0.
accountutopian.pay
weight2,500
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id47,465,357
net_rshares3,497,982,864,051
author_curate_reward""
vote details (57)
@knowledges ·
$0.10
Hi @jakipatryk, This contribution has been verified after reevaluation. Thank you.

You can contact us on [Discord](https://discord.gg/uTyJkNm).
**[[utopian-moderator]](https://utopian.io/moderators)**
πŸ‘  ,
properties (23)
authorknowledges
permlinkre-jakipatryk-refresh-token-is-not-revocable-20180401t191905861z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-04-01 19:19:12
last_update2018-04-01 19:19:12
depth1
children0
last_payout2018-04-08 19:19:12
cashout_time1969-12-31 23:59:59
total_payout_value0.100 HBD
curator_payout_value0.001 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length201
author_reputation98,021,227,622,369
root_title"The refresh token should be revocable"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id47,816,237
net_rshares35,262,301,900
author_curate_reward""
vote details (2)
@marekkaminski ·
$0.06
Nice! Promoted for 0.008SBD! :-]
πŸ‘  
properties (23)
authormarekkaminski
permlinkre-jakipatryk-refresh-token-is-not-revocable-20180330t163046006z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"app":"steemit/0.1"}
created2018-03-30 16:30:15
last_update2018-03-30 16:30:15
depth1
children0
last_payout2018-04-06 16:30:15
cashout_time1969-12-31 23:59:59
total_payout_value0.053 HBD
curator_payout_value0.007 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length32
author_reputation518,150,328,063
root_title"The refresh token should be revocable"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id47,482,365
net_rshares20,656,970,915
author_curate_reward""
vote details (1)
@sunray ·
$1.49
Your contribution cannot be approved because it does not follow the [Utopian Rules](https://utopian.io/rules).

Your suggestion has to do with the usage of the platform created by the project owner platform and not to do with a suggestion relating to a technical issue to increase the running of the platform.  

You can contact us on [Discord](https://discord.gg/uTyJkNm).
**[[utopian-moderator]](https://utopian.io/moderators)**
πŸ‘  
properties (23)
authorsunray
permlinkre-jakipatryk-refresh-token-is-not-revocable-20180401t112714946z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-04-01 11:27:36
last_update2018-04-01 11:27:36
depth1
children2
last_payout2018-04-08 11:27:36
cashout_time1969-12-31 23:59:59
total_payout_value1.119 HBD
curator_payout_value0.371 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length430
author_reputation89,977,246,052,396
root_title"The refresh token should be revocable"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id47,763,020
net_rshares509,536,920,452
author_curate_reward""
vote details (1)
@jakipatryk · (edited)
I'm not sure if you understood both my contribution and how the SteemConnect works.

SteemConnect is not only an app for (for example) generating hot signing links. It is also an OAuth2 service for developers that allow them to implement authentication flow for their app.

> Suggestions may only relate to significant technical aspects of the project (rather than processes or organisational issues).

I believe my contribution is related to significant technical aspects of the project - revoking tokens is an essential feature for OAuth2 service.

> Suggestions are minor features / enhancements to an Open Source project.

Revocable refresh token is a minor feature idd.
properties (22)
authorjakipatryk
permlinkre-sunray-re-jakipatryk-refresh-token-is-not-revocable-20180401t162740407z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"busy","app":"busy/2.4.0"}
created2018-04-01 16:28:00
last_update2018-04-01 16:40:06
depth2
children0
last_payout2018-04-08 16:28:00
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length674
author_reputation14,313,610,947,295
root_title"The refresh token should be revocable"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id47,803,740
net_rshares0
@utopian.tip ·
Hey @sunray, I just gave you a tip for your hard work on moderation. Upvote this comment to support the utopian moderators and increase your future rewards!
properties (22)
authorutopian.tip
permlinkre-re-jakipatryk-refresh-token-is-not-revocable-20180401t112714946z-20180402t085544
categoryutopian-io
json_metadata""
created2018-04-02 08:55:45
last_update2018-04-02 08:55:45
depth2
children0
last_payout2018-04-09 08:55:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length156
author_reputation238,310,597,885
root_title"The refresh token should be revocable"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id47,897,783
net_rshares0
@utopian-io ·
### Hey @jakipatryk I am @utopian-io. I have just upvoted you!
#### Achievements
- You have less than 500 followers. Just gave you a gift to help you succeed!
- Seems like you contribute quite often. AMAZING!
#### Suggestions
- Contribute more often to get higher and higher rewards. I wish to see you often!
- Work on your followers to increase the votes/rewards. I follow what humans do and my vote is mainly based on that. Good luck!
#### Get Noticed!
- Did you know project owners can manually vote with their own voting power or by voting power delegated to their projects? Ask the project owner to review your contributions!
#### Community-Driven Witness!
I am the first and only Steem Community-Driven Witness. <a href="https://discord.gg/zTrEMqB">Participate on Discord</a>. Lets GROW TOGETHER!
- <a href="https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1">Vote for my Witness With SteemConnect</a>
- <a href="https://v2.steemconnect.com/sign/account-witness-proxy?proxy=utopian-io&approve=1">Proxy vote to Utopian Witness with SteemConnect</a>
- Or vote/proxy on <a href="https://steemit.com/~witnesses">Steemit Witnesses</a>

[![mooncryption-utopian-witness-gif](https://steemitimages.com/DQmYPUuQRptAqNBCQRwQjKWAqWU3zJkL3RXVUtEKVury8up/mooncryption-s-utopian-io-witness-gif.gif)](https://steemit.com/~witnesses)

**Up-vote this comment to grow my power and help Open Source contributions like this one. Want to chat? Join me on Discord https://discord.gg/Pc8HG9x**
properties (22)
authorutopian-io
permlinkre-jakipatryk-refresh-token-is-not-revocable-20180402t120751571z
categoryutopian-io
json_metadata{"tags":["utopian-io"],"community":"utopian","app":"utopian/1.0.0"}
created2018-04-02 12:07:54
last_update2018-04-02 12:07:54
depth1
children0
last_payout2018-04-09 12:07:54
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length1,508
author_reputation152,955,367,999,756
root_title"The refresh token should be revocable"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id47,922,305
net_rshares0