#### Repository https://github.com/hapramp/steemconnect4j ## 1. Introduction https://ipfs.busy.org/ipfs/QmXVGoj2vx4ojo98kLXxVeUioeJUjsEpCcBdUGWSyn3PHB SteemConnect4j is a Java SDK for SteemConnect v2. To read more about it, check out the introduction blog - [Introducing SteemConnect4j](https://busy.org/@hapramp/introducing-steemconnect4j). In this blog post, I will be discussing about the following improvements made in the project - - Improved Security using Refresh Tokens - Increased coverage - Other bug fixes ## 2. Improved Security using `Refresh Tokens` `Refresh Tokens` are used to grant headless operations the access to carry out operations on behalf of the user. These tokens do not expire (in contrast; access tokens expire in 7 days) and can be used to generate new access tokens for the user. It is required to have the `offline` `scope` in order to retrieve the refresh token. ### 2.1 Code Changes to Introduce `Refresh Tokens` The route to get the access token is defined as a constant in the application -  Now the `getLoginUrl(boolean wantCode)` is refactored to contain a boolean parameter. This parameter decides whether the returing url after successfull login will contain a `UserCode` or `AccessToken`. So, developer now can decide the user security through this parameter.  Getting an `AccessToken` is a three step process `Get Code` -> `Get RefreshToken` -> `Get AccessToken` > Note:Code is returned when user logs in if `getLoginUrl(true)` is used for logging in. Methods to get/set client secret were added to [`SteemConnectOptions`](https://github.com/hapramp/steemconnect4j/blob/master/steemconnect4j/src/main/java/com/hapramp/steemconnect4j/SteemConnectOptions.java) class -  Finally, methods to get refresh token and get access token from refresh token were added to complete the integration -  ### 3. Increased Coverage We have been working on improving the coverage for the SDK and we're happy to inform that the coverage is now at a decent level. #### 3.1. Coverage Chart  #### 3.2. Sunburst Here is the sunburst from [Codecov](https://codecov.io/) -  You can see the detailed coverage report at https://codecov.io/gh/hapramp/steemconnect4j. ## 4. Other Bug Fixes Several bugs were fixed for the SDK and it is now being tested in the HapRamp Android application. As we move forward with integrating more parts of the SDK into the application, we will be discovering and resolving more bugs that pop up. #### Pull Requests | Link | Description | |----------|---- | | [hapramp/steemconnect4j#18](https://github.com/hapramp/steemconnect4j/pull/18) | Adding support for refresh tokens | | [hapramp/steemconnect4j#20](https://github.com/hapramp/steemconnect4j/pull/20) | Adding usage documentation for refresh tokens | | [hapramp/steemconnect4j#21](https://github.com/hapramp/steemconnect4j/pull/21) and [hapramp/steemconnect4j#16](https://github.com/hapramp/steemconnect4j/pull/16) | Adding test cases | #### Github Account https://github.com/bxute ---- ###### Join the conversation on Discord - https://discord.gg/r9vwcHe.
author | bxute |
---|---|
permlink | steemconnect4j-security-improvement-and-bug-fixes |
category | utopian-io |
json_metadata | {"tags":["utopian-io","development","hapramp","steemconnect","steemit"],"image":["https://ipfs.busy.org/ipfs/QmXVGoj2vx4ojo98kLXxVeUioeJUjsEpCcBdUGWSyn3PHB","https://ipfs.busy.org/ipfs/QmXjeKwRz2D7QuWJKyoKRVKsv4MvvuptBhzaSQQJ9mn7Rz","https://ipfs.busy.org/ipfs/QmZRZg617o1SMwXv9BQPmwyjZxRmtePG733V8iQPBetwV9","https://ipfs.busy.org/ipfs/QmeCwpfqCmq6WLk6yRjQgPpurfvTw4AjZa688CBzjHX1zG","https://ipfs.busy.org/ipfs/QmQgpNqHixT3EFVCoN8FNTUdF3dBD8FtuxgNyg5Wz7EGQi","https://ipfs.busy.org/ipfs/QmRBGcoqcAZHvZLrJcfEYk3DweHzuSzXSZAFLLvNYnevhp","https://ipfs.busy.org/ipfs/QmXsGUfrbs8ZAUF4CVGsLoQvamBBsie63fVQBaADD17SyY"],"links":["https://github.com/hapramp/steemconnect4j","https://busy.org/@hapramp/introducing-steemconnect4j","https://github.com/hapramp/steemconnect4j/blob/master/steemconnect4j/src/main/java/com/hapramp/steemconnect4j/SteemConnectOptions.java","https://codecov.io/","https://codecov.io/gh/hapramp/steemconnect4j","https://github.com/hapramp/steemconnect4j/pull/18","https://github.com/hapramp/steemconnect4j/pull/20","https://github.com/hapramp/steemconnect4j/pull/21","https://github.com/hapramp/steemconnect4j/pull/16","https://github.com/bxute","https://discord.gg/r9vwcHe"],"app":"steemit/0.1","format":"markdown"} |
created | 2018-07-05 06:08:24 |
last_update | 2018-07-05 06:08:24 |
depth | 0 |
children | 3 |
last_payout | 2018-07-12 06:08:24 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 64.395 HBD |
curator_payout_value | 21.164 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 3,668 |
author_reputation | 7,043,008,489,088 |
root_title | "SteemConnect4j - Security Improvement and Bug Fixes" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,481,453 |
net_rshares | 41,161,736,095,035 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
yuxi | 0 | 2,955,738,109 | 10% | ||
achiron | 0 | 21,089,839,561 | 100% | ||
miniature-tiger | 0 | 98,143,086,357 | 100% | ||
semasping | 0 | 6,308,494,375 | 100% | ||
doughtaker | 0 | 16,003,913,559 | 100% | ||
alexzicky | 0 | 13,386,885,370 | 30% | ||
techtek | 0 | 45,001,602,270 | 100% | ||
leir | 0 | 733,212,509 | 20% | ||
jrawsthorne | 0 | 13,445,918,927 | 100% | ||
utopian-io | 0 | 40,507,356,590,379 | 26.36% | ||
the-dragon | 0 | 2,217,682,685 | 100% | ||
singhpratyush | 0 | 3,930,212,096 | 100% | ||
rajatdangi | 0 | 612,468,721 | 100% | ||
amosbastian | 0 | 47,257,787,866 | 100% | ||
r351574nc3 | 0 | 998,496,737 | 3% | ||
bxute | 0 | 608,911,162 | 100% | ||
holger80 | 0 | 359,751,493,515 | 100% | ||
liberviarum | 0 | 3,586,828,223 | 25% | ||
properfraction | 0 | 584,344,258 | 100% | ||
hapramp | 0 | 6,115,099,070 | 100% | ||
statsexpert | 0 | 397,623,789 | 1% | ||
electronicsworld | 0 | 6,441,695,253 | 100% | ||
mightypanda | 0 | 4,808,170,244 | 100% |
Reviewing projects with a good test coverage always makes me happy. One side note:  This kind of code comments are not really needed. I know code commenting has a place on review mechanics, we will work on that to make it better. See [gregory's](https://steemit.com/utopian-io/@jaysermendez/knacksteem-api-more-security-and-features#@gregory.latinier/re-jaysermendez-knacksteem-api-more-security-and-features-20180705t094231460z) comment on this. Thanks! *** Your contribution has been evaluated according to [Utopian policies and guidelines](https://join.utopian.io/guidelines), as well as a predefined set of questions pertaining to the category. To view those questions and the relevant answers related to your post, [click here](https://review.utopian.io/result/3/2322211). ---- Need help? Write a ticket on https://support.utopian.io/. Chat with us on [Discord](https://discord.gg/uTyJkNm). [[utopian-moderator]](https://join.utopian.io/)
author | emrebeyler |
---|---|
permlink | re-bxute-steemconnect4j-security-improvement-and-bug-fixes-20180705t095850015z |
category | utopian-io |
json_metadata | {"tags":["utopian-io"],"image":["https://cdn.steemitimages.com/DQmeyAL2UxR8vdDBEFJWmtcMNngCBBaB6UU5Z3JVqETLgxc/Screen%20Shot%202018-07-05%20at%2012.48.35%20PM.png"],"links":["https://steemit.com/utopian-io/@jaysermendez/knacksteem-api-more-security-and-features#@gregory.latinier/re-jaysermendez-knacksteem-api-more-security-and-features-20180705t094231460z","https://join.utopian.io/guidelines","https://review.utopian.io/result/3/2322211","https://support.utopian.io/","https://discord.gg/uTyJkNm","https://join.utopian.io/"],"app":"steemit/0.1"} |
created | 2018-07-05 09:58:48 |
last_update | 2018-07-05 09:58:48 |
depth | 1 |
children | 1 |
last_payout | 2018-07-12 09:58:48 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 1,129 |
author_reputation | 448,535,049,068,622 |
root_title | "SteemConnect4j - Security Improvement and Bug Fixes" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,503,403 |
net_rshares | 4,930,911,048 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
singhpratyush | 0 | 3,934,597,888 | 100% | ||
neutralizer | 0 | 778,925,415 | 6% | ||
randohealer | 0 | 445,784,227 | 3% | ||
estellereuh | 0 | -228,396,482 | -100% |
I am famous hahaaah
author | jaysermendez |
---|---|
permlink | re-re-bxute-steemconnect4j-security-improvement-and-bug-fixes-20180708t025125808z |
category | utopian-io |
json_metadata | {"community":"steemia","app":"steemia/0.0.1"} |
created | 2018-07-08 02:51:27 |
last_update | 2018-07-08 02:51:27 |
depth | 2 |
children | 0 |
last_payout | 2018-07-15 02:51:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 19 |
author_reputation | 20,790,862,502,465 |
root_title | "SteemConnect4j - Security Improvement and Bug Fixes" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,846,617 |
net_rshares | 0 |
Hey @bxute **Thanks for contributing on Utopian**. Weβre already looking forward to your next contribution! **Want to chat? Join us on Discord https://discord.gg/h52nFrV.** <a href='https://v2.steemconnect.com/sign/account-witness-vote?witness=utopian-io&approve=1'>Vote for Utopian Witness!</a>
author | utopian-io |
---|---|
permlink | re-steemconnect4j-security-improvement-and-bug-fixes-20180708t043508z |
category | utopian-io |
json_metadata | "{"app": "beem/0.19.42"}" |
created | 2018-07-08 04:35:09 |
last_update | 2018-07-08 04:35:09 |
depth | 1 |
children | 0 |
last_payout | 2018-07-15 04:35:09 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 297 |
author_reputation | 152,955,367,999,756 |
root_title | "SteemConnect4j - Security Improvement and Bug Fixes" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 63,853,419 |
net_rshares | 0 |