1,pac4j是什么?
pac4j是一個支持多種支持多種協議的身份認證的Java客戶端。
2,pac4j的12種客戶端認證機制:目前我只有用過第一和第八種。
-
OAuth (1.0 & 2.0): Facebook, Twitter, Google, Yahoo, LinkedIn, Github... using the
pac4j-oauthmodule -
CAS (1.0, 2.0, SAML, logout & proxy) + REST API support using the
pac4j-casmodule -
HTTP (form, basic auth, IP, header, GET/POST parameter authentications) using the
pac4j-httpmodule -
OpenID using the
pac4j-openidmodule -
SAML (2.0) using the
pac4j-samlmodule -
Google App Engine UserService using the
pac4j-gaemodule -
OpenID Connect 1.0 using the
pac4j-oidcmodule -
JWT using the
pac4j-jwtmodule -
LDAP using the
pac4j-ldapmodule -
relational DB using the
pac4j-sqlmodule -
MongoDB using the
pac4j-mongomodule -
Stormpath using the
pac4j-stormpathmodule.

3,maven配置
1 <dependency> 2 <groupId>org.pac4j</groupId> 3 <artifactId>spring-security-pac4j</artifactId> 4 <version>1.4.3</version> 5 </dependency> 6 <dependency> 7 <groupId>org.pac4j</groupId> 8 <artifactId>pac4j-oauth</artifactId> 9 <version>1.8.8</version> 10 </dependency>
主要是三個jar包:

4,下面是我收藏的項目鏈接,對於各種認證機制的學習非常有幫助:
項目主頁:http://www.open-open.com/lib/view/home/1418870307933
