我是 CAS 的新手。
我喜歡向 Mysql 資料庫中的用戶串列驗證用戶身份。我在build.gradle檔案中包含了這行代碼
implementation "org.apereo.cas:cas-server-support-jdbc:${project.'cas.version'}"
這是Mysql中的表定義。

我在 Ubuntu 服務器中設定了 CAS 6.4 實體,禁用靜態用戶身份驗證并配置/etc/cas/config/cas.properties以使用 Mysql 作為資料源進行身份驗證,如下配置,所有其他設定保留為默認值:
server.name=https://id.example.com
server.prefix=${cas.server.name}/
server.context-path=/ server.port=443
server.ssl.key-store=file:/etc/cas/theKeystore
server.ssl.key-store-password=theKeystorePassword
server.ssl.key-password=thePassword
logging.config=file:/etc/cas/config/log4j2.xml
cas.authn.accept.enabled=false
cas.authn.jdbc.query[0].driver-class: com.mysql.jdbc.Driver
cas.authn.jdbc.query[0].field-password: password
cas.authn.jdbc.query[0].password: theDBPassword
cas.authn.jdbc.query[0].sql: SELECT * FROM users WHRE uid=?
cas.authn.jdbc.query[0].url: jdbc:mysql://localhost:3306/cas?useUnicode=true&characterEncoding=utf-8&autoReconnect=true
cas.authn.jdbc.query[0].user: theDBUser
我已將 Mysql 上的 global general_log 設定為ON以跟蹤任何連接嘗試。但是,CAS 服務器似乎從未嘗試連接到 Mysql 服務器。在用戶站點上,他們只是在登錄頁面上收到嘗試失敗的訊息。
有什么我錯過的嗎?
uj5u.com熱心網友回復:
似乎不是使用
com.mysql.jdbc.Driver
我需要使用
com.mysql.cs.jdbc.Driver
作為司機級。
轉載請註明出處,本文鏈接:https://www.uj5u.com/net/459792.html
