Liferay Yubikey OTP Login

I bought a Yubikey 4 last fall but didn’t have time to play with it until now. Yubikey is awesome and quite cheap USB authentication key. It also support FIDO U2F in addition to one-time-password. So far I’ve enabled on my Facebook account as well as MacOS Sierra login.  I also wanted to write some code and integrate it with Liferay. As a result I’ve implemented a simple Yubikey OTP login.

I chose to use the OTP instead of FIDO U2F because it was quite simple and I wanted to use it as primary login in place of username and password. It could have also been used as second factor to make the username and password login more secure but I’m leaving that as a future exercise.

I’ve posted the code on Github and plan on publishing it to Liferay marketplace. Check it out and let me know what you think. Full configuration instructions are on the README.md