标准OIDC 客户端

OIDC discovery

Casdoor完全完成了OIDC协议。 如果您的应用程序已经运行了另一个 OAuth 2,那么 (OIDC) 身份提供商一般会通过标准的 OIDC 客户端库提供服务,如果您想要迁移到Casdoor, 使用 OIDC discovery会帮助您非常容易地切换到Casdoor。 Cassdoor’s OIDC discovery URL 是:

  1. <your-casdoor-backend-host>/.众所周知的/openid-configuration

例如,演示站点的 OIDC discovery URL是:https://door.casbin.com/.well known n/openid-configur, 具有以下内容:

  1. {
  2. "issuer": "https://door.casbin.com",
  3. "authorization_endpoint": "https://door.casbin.com/login/oauth/authorize",
  4. "token_endpoint": "https://door.casbin.com/api/login/oauth/access_token",
  5. "userinfo_endpoint": "https://door.casbin.com/api/get-account",
  6. "jwks_uri": "https://door.casbin.com/api/certs",
  7. "response_types_supported": [
  8. "id_token"
  9. ],
  10. "response_modes_supported": [
  11. "login",
  12. "code",
  13. "link"
  14. ],
  15. "grant_types_supported": [
  16. "password",
  17. "authorization_code"
  18. ],
  19. "subject_types_supported": [
  20. "public"
  21. ],
  22. "id_token_signing_alg_values_supported": [
  23. "RS256"
  24. ],
  25. "scopes_supported": [
  26. "openid",
  27. "email",
  28. "profile",
  29. "address",
  30. "phone",
  31. "offline_access"
  32. ],
  33. "claims_supported": [
  34. "iss",
  35. "ver",
  36. "sub",
  37. "aud",
  38. "iat",
  39. "exp",
  40. "id",
  41. "type",
  42. "displayName",
  43. "avatar",
  44. "permanentAvatar",
  45. "email",
  46. "phone",
  47. "location",
  48. "affiliation",
  49. "title",
  50. "homepage",
  51. "bio",
  52. "tag",
  53. "region",
  54. "language",
  55. "score",
  56. "ranking",
  57. "isOnline",
  58. "isAdmin",
  59. "isGlobalAdmin",
  60. "isForbidden",
  61. "signupApplication",
  62. "ldap"
  63. ],
  64. "request_parameter_supported": true,
  65. "request_object_signing_alg_values_supported": [
  66. "HS256",
  67. "HS384",
  68. "HS512"
  69. ]
  70. }

OIDC 客户端库列表

这里我们列出了一些OIDC 客户端库,如Go 和 Java 等语言:

OIDC 客户端库语言链接
go-oidcGohttps://github.com/coreos/go-oidc
pac4j-oidcJavahttps://www.pac4j.org/docs/clients/openid-connect.html

上表远远没有完成。 OIDC 客户端库的完整列表请查看更多详情:

  1. https://oauth.net/code/
  2. https://openid.net/
    1. 认证的 OpenID Connect 实现
    2. 未认证的 OpenID Connect 实现