tuupola/slim-jwt-auth

Why private methods?

Closed this issue · 2 comments

Hello
I need to access some methods like fetchToken or decodeToken or extend this library.
can you change methods to public or protected in future release?

@EhsanCh maybe you are looking for a way to work with the raw token, as I did, check out this PR: #168

Anyway, having final classes and private methods/members helps when maintaining a library, though it could hurt it's extensibility. In this case, I believe most of use cases can be covered by using composition as opposed to inheritance, which is supported quite well.

What @dakujem said. If the methods were public I would need to support them. When they are private I can change them without worrying of breaking BC. I also think providing such methods is not responsibility of this middleware.