Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor complex LoginController logic into a login chain of responsibility #15365

Merged
merged 1 commit into from
May 7, 2019

Conversation

ChristophWurst
Copy link
Member

This method has been on my list of code to refactor for a long time. As I now have to touch it for https://github.com/orgs/nextcloud/projects/29, I decided to break the code into smaller, maintainable and testable chunks. The code now follows a more strict single responsibility principle, while implementing the chain of responsibility pattern.

@ChristophWurst ChristophWurst added this to the Nextcloud 17 milestone May 3, 2019
@ChristophWurst ChristophWurst added 3. to review Waiting for reviews and removed 2. developing Work in progress labels May 6, 2019
@ChristophWurst ChristophWurst marked this pull request as ready for review May 6, 2019 11:53
@ChristophWurst
Copy link
Member Author

From what I can tell CI failures do not look related. But tell me if I'm wrong.

@ChristophWurst
Copy link
Member Author

Redis::connect(): connect() failed: Connection refused

-> restarted

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

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

This is just great. So much cleaner. And tests 🚀

I didn't test in debt but most stuff didn't blow up with my smoke testing.

}

public function testNotTwoFactorAuthenticated() {
$this->fail('todo');
Copy link
Member Author

Choose a reason for hiding this comment

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

guess what … CI fails for a reason

Copy link
Member

Choose a reason for hiding this comment

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

NO WAY!

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Copy link
Member

@MorrisJobke MorrisJobke left a comment

Choose a reason for hiding this comment

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

Tested and works 👍

@MorrisJobke MorrisJobke 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 7, 2019
@MorrisJobke MorrisJobke merged commit a6a8f85 into master May 7, 2019
@MorrisJobke MorrisJobke deleted the refactor/login-chain branch May 7, 2019 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish technical debt
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants