-
Notifications
You must be signed in to change notification settings - Fork 61
Improve the Authenticator ? #16
Comments
The PR #12 has a good discussion about it.... |
I think your issue describes the problem better. It's something we will eventually add. Maybe we could use the Decorator Pattern to support various configurations of hashing/salting/peppering? |
Hey, thank you! About the pattern, the decorator is a good pattern, but works with inheritance, adding behaviors to object, and make it fat. I think, the Delegation pattern is a best way: "The Delegation Design Pattern is a technique where an object exposes certain behavior but it actually delegates responsibility for implementing that behavior to an associated object." So, I'll implement and later we can talk more about the best way... |
The big advantage of the Decorator pattern is that we could cover all special cases like But maybe it's a bit over-engineered. Looking forward to see your suggestion 😄 |
I don't like this code:
It can be helpful and works, but I do not like it... I think we can improve, If we refactor it to something like:
What do you think about the idea?
I can provide a PR ;)
The text was updated successfully, but these errors were encountered: