Awesome Open Source
Awesome Open Source

pac4j is an easy and powerful security engine for Java to authenticate users, get their profiles and manage authorizations in order to secure web applications and web services.

It provides a comprehensive set of concepts and components. It is based on Java 8 and available under the Apache 2 license. It is available for most frameworks/tools and supports most authentication/authorization mechanisms.

Available implementations (Get started by clicking on your framework):

Spring Web MVC (Spring Boot)JEEApache ShiroSpring Security (Spring Boot)Play 2.xVertx

Spark JavaJavalinRatpackPippoUndertowJooby

CAS serverJAX-RSDropwizardLagomAkka HTTPApache Knox

Authentication mechanisms:

OAuth (Facebook, Twitter, Google...) - SAML - CAS - OpenID Connect - HTTP - Google App Engine - Kerberos (SPNEGO/Negotiate)

LDAP - SQL - JWT - MongoDB - CouchDB - IP address - REST API

Authorization mechanisms:

Roles/permissions - Anonymous/remember-me/(fully) authenticated - Profile type, attribute

CORS - CSRF - Security headers - IP address, HTTP method


The latest released version is the Maven Central, available in the Maven central repository. The next version is under development.

Read the documentation for more information.

Need help?

You can use the mailing lists or the commercial support.

Supported by

CAS in the cloud The CAS and pac4j consulting company

Alternatives To Pac4j
Select To Compare

Alternative Project Comparisons
Related Awesome Lists
Top Programming Languages
Top Projects

Get A Weekly Email With Trending Projects For These Topics
No Spam. Unsubscribe easily at any time.
Java (391,896
Security (31,786
Spring (28,663
Authentication (26,880
Play Framework (14,716
Oauth (14,236
Jwt (9,880
Authorization (5,875
Ldap (3,623
Spring Mvc (2,712
Openid (1,958
Spring Security (1,787
Cas (1,607
Shiro (1,390
Saml (1,241
Vertx (1,047
Dropwizard (858
Openid Connect (685
Jax Rs (356
Sparkjava (183
Ratpack (32