SparkJava: pac4j

Securing a SparkJava webapp, with options for OAuth or LDAP

The library Pac4J, online at is a kind of swiss army knife for Java Web App Security.
It can be used with SparkJava, but with many other frameworks as well.

The github repo offers a bridge from SparkJava to Pac4J.

The following repo provides an example of an application that authenticates with Github, then prints out a list of all the repos in the UCSB-CS56-Projects organization:

More on SparkJava: pac4j