【pac4j】OAuth 認證機制 入門篇


1,pac4j是什么?

pac4j是一個支持多種支持多種協議的身份認證的Java客戶端。

2,pac4j的12種客戶端認證機制:目前我只有用過第一和第八種。

  1. OAuth (1.0 & 2.0): Facebook, Twitter, Google, Yahoo, LinkedIn, Github... using the pac4j-oauth module

  2. CAS (1.0, 2.0, SAML, logout & proxy) + REST API support using the pac4j-cas module

  3. HTTP (form, basic auth, IP, header, GET/POST parameter authentications) using the pac4j-http module

  4. OpenID using the pac4j-openid module

  5. SAML (2.0) using the pac4j-saml module

  6. Google App Engine UserService using the pac4j-gae module

  7. OpenID Connect 1.0 using the pac4j-oidc module

  8. JWT using the pac4j-jwt module

  9. LDAP using the pac4j-ldap module

  10. relational DB using the pac4j-sql module

  11. MongoDB using the pac4j-mongo module

  12. Stormpath using the pac4j-stormpath module.

 

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>
View Code

主要是三個jar包:

 

4,下面是我收藏的項目鏈接,對於各種認證機制的學習非常有幫助:

項目主頁:http://www.open-open.com/lib/view/home/1418870307933

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM