wstrange / GoogleAuth

Google Authenticator Server side code
BSD 3-Clause "New" or "Revised" License
1.05k stars 327 forks source link

Base64 encoding provider #47

Open roytmana opened 8 years ago

roytmana commented 8 years ago

Hi @wstrange It could be a bit far fetched but I am trying to reduce dependencies. since JDK8 has built in Base64 and many server environments also have some Base64 utilities does it make sense to make this dependency optional and allow configuring Authenticator with an implementation of your internal Base64 interface. This way with httputils made optional your library will be a little sweet no dependencies library. otherwise bringing it int server environment may cause jar conflicts

emcrisostomo commented 8 years ago

Hi @roytmana,

This library still targets Java 7 and the main reason I'm doing so is because I see a lot of people still using it, especially on enterprise applications. Dropping Java 7 is certainly possible, but I'm not sure the pros (removing a 278K dependency with no transitive dependency) outweighs the cons: either dropping Java SE 7 (no authoritative statistics, but quick Google search suggest > 40% of the Java user base is running 7) or implementing an internal service interface to plug a Base64 codec.

emcrisostomo commented 8 years ago

Actually, I'm leaving this open and tagged for a future Java 8 update.

roytmana commented 8 years ago

Hi @emcrisostomo,

I do not really propose to drop jdk7 support but rather a pluggable provider for encoding so I can implement an alternative (JDK8 based or tomcat libraries based) provider and avoid importing the library. It is not about the size of course but about avoiding a single purpose library like yours bringing in dependencies that may conflict with the main application dependencies. This library is pretty stable and small so I can live with it :-)

Thank you, Alex