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

Extending the class #11

Closed
sportfogadas opened this issue Jan 27, 2017 · 1 comment
Closed

Extending the class #11

sportfogadas opened this issue Jan 27, 2017 · 1 comment
Labels

Comments

@sportfogadas
Copy link

Hi,

Wouldn't it be better for the methods to be protected in case you want to extend the Auth class? For example, if I want a login method with user name instead of e-mail.

@ocram
Copy link
Contributor

ocram commented Jan 28, 2017

Thanks for your feedback!

This has definitely been thought about. But in general, we're following the principle of designing for inheritance, instead of just opening up every single method and allowing for it to be overridden:

Design and document for inheritance or else prohibit it

-- Joshua Bloch, Effective Java.

That being said, you're welcome to open a new issue whenever you feel that some method needs to be opened up. We can then discuss it, design for inheritance as needed and document it properly, and then ship the change in a new release.

Let's discuss your specific idea of having a login by username in a separate issue as well: #12

@ocram ocram closed this as completed Jan 28, 2017
@ocram ocram removed the faq label Nov 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants