【pac4j】OAuth 认证机制 入门篇
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