Skip to content

[stable13] Improve OAuth - #9540

Merged
MorrisJobke merged 8 commits into
stable13from
backport/9517/stable13
May 23, 2018
Merged

[stable13] Improve OAuth#9540
MorrisJobke merged 8 commits into
stable13from
backport/9517/stable13

Conversation

@rullzer

@rullzerrullzer commented May 22, 2018

Copy link
Copy Markdown
Member

This for example will allow rotating the apptoken for oauth
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer
rullzerforce-pushed the backport/9517/stable13 branch from 2214708 to 8fcb7d4CompareMay 22, 2018 10:51
@codecov

codecovBot commented May 22, 2018

Copy link
Copy Markdown

Codecov Report

Merging #9540 into stable13 will increase coverage by 0.01%.
The diff coverage is 62.9%.

@@ Coverage Diff @@## stable13 #9540 +/- ##
=============================================
+ Coverage 51.38% 51.4% +0.01% - Complexity 25052 25081 +29 
=============================================
Files 1609 1612 +3 Lines 95350 95457 +107 Branches 1376 1376 =============================================
+ Hits 48999 49066 +67 - Misses 46351 46391 +40
Impacted FilesCoverage ΔComplexity Δ
apps/oauth2/composer/composer/autoload_static.php0% <ø> (ø)1 <0> (ø)⬇️
core/Migrations/Version13000Date20180516101403.php0% <0%> (ø)2 <2> (?)
version.php0% <0%> (ø)0 <0> (ø)⬇️
...pps/oauth2/composer/composer/autoload_classmap.php0% <0%> (ø)0 <0> (ø)⬇️
apps/oauth2/lib/Migration/SetTokenExpiration.php0% <0%> (ø)5 <5> (?)
...vate/Authentication/Token/DefaultTokenProvider.php98.03% <100%> (+3.65%)32 <2> (+6)⬆️
...uthentication/Exceptions/ExpiredTokenException.php100% <100%> (ø)2 <2> (?)
lib/private/Authentication/Token/DefaultToken.php89.58% <100%> (+2.74%)17 <4> (+4)⬆️
core/Controller/ClientFlowLoginController.php79.35% <100%> (ø)25 <0> (ø)⬇️
...rivate/Authentication/Token/DefaultTokenMapper.php100% <100%> (ø)11 <0> (ø)⬇️
... and 7 more

@rullzer
rullzerforce-pushed the backport/9517/stable13 branch 3 times, most recently from a70250d to 710f0ddCompareMay 22, 2018 12:20
However due to the nature of what we store in the token (encrypted
passwords etc). We can't just delete the tokens because that would make
the oauth refresh useless.
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzer
rullzerforce-pushed the backport/9517/stable13 branch from 710f0dd to 46aafe4CompareMay 22, 2018 12:26
rullzer added 6 commits May 22, 2018 14:50
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
On a refresh token request:
* rorate
* reset expire
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
@rullzerrullzer added enhancement 3. to review Waiting for reviews labels May 22, 2018
@rullzerrullzer added this to the Nextcloud 13.0.3 milestone May 22, 2018

@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.

LGTM 👍

{
public static $firstCharsPsr4 = array (
'O' => true,
public static $prefixLengthsPsr4 = array (

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.

why was this changed?

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.

Because I had to rerun the autoload dump. And I guess there is a new composer version ;)

@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.

Works 👍

@MorrisJobke
MorrisJobke merged commit 2f059d1 into stable13May 23, 2018
@MorrisJobke
MorrisJobke deleted the backport/9517/stable13 branch May 23, 2018 13:42
@MorrisJobkeMorrisJobke mentioned this pull request May 31, 2018
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to reviewWaiting for reviewsenhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@rullzer@MorrisJobke@ChristophWurst