Skip to content

Allow the rotation of tokens - #9484

Merged
rullzer merged 1 commit into
masterfrom
feature/noid/support_rotating_tokens
May 16, 2018
Merged

Allow the rotation of tokens#9484
rullzer merged 1 commit into
masterfrom
feature/noid/support_rotating_tokens

Conversation

@rullzer

Copy link
Copy Markdown
Member

This for example will allow rotating the apptoken for oauth

Signed-off-by: Roeland Jago Douma roeland@famdouma.nl

@codecov

codecovBot commented May 15, 2018

Copy link
Copy Markdown

Codecov Report

Merging #9484 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@ Coverage Diff @@## master #9484 +/- ##
============================================
+ Coverage 51.68% 51.69% +<.01% - Complexity 25720 25721 +1 
============================================
Files 1641 1641 Lines 96441 96443 +2 Branches 1393 1393 ============================================
+ Hits 49850 49858 +8 + Misses 46591 46585 -6
Impacted FilesCoverage ΔComplexity Δ
lib/private/Authentication/Token/DefaultToken.php83.92% <100%> (+1.23%)18 <2> (+2)⬆️
...vate/Authentication/Token/DefaultTokenProvider.php97.91% <100%> (+3.53%)28 <2> (+2)⬆️
lib/private/Files/Cache/Propagator.php94.93% <0%> (-1.27%)16% <0%> (ø)
lib/private/Preview/WatcherConnector.php90.9% <0%> (-0.76%)5% <0%> (ø)
apps/files_versions/lib/Storage.php66.06% <0%> (-0.26%)103% <0%> (ø)
apps/files_trashbin/lib/Expiration.php91.93% <0%> (+1.61%)29% <0%> (ø)⬇️
lib/private/Preview/Watcher.php77.77% <0%> (+13.49%)4% <0%> (-3%)⬇️

@MorrisJobkeMorrisJobke left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code makes sense 👍

@rullzerrullzer mentioned this pull request May 16, 2018
1 task

@ChristophWurstChristophWurst left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Found one minor naming issue.

* @param string $newTokenId
* @return IToken
*/
public function setNewToken(IToken $token, string $oldTokenId, string $newTokenId): IToken;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to name the method rotate or similar?

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes will do. To much token in this indeed


/**
* Get the name of the token
* @return string

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nitpick for future PRs: return type annotations are not necessary here 😉

This for example will allow rotating the apptoken for oauth
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer
rullzerforce-pushed the feature/noid/support_rotating_tokens branch from de6812c to aba2559CompareMay 16, 2018 17:27
@rullzerrullzer added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels May 16, 2018
@rullzer
rullzer merged commit 81ab924 into masterMay 16, 2018
@rullzer
rullzer deleted the feature/noid/support_rotating_tokens branch May 16, 2018 18:03
This was referenced May 22, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to releaseReady to be released and/or waiting for tests to finishenhancementfeature: authentication

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@rullzer@MorrisJobke@ChristophWurst