CAS5.3.X 配置備忘


##
# 普通MD5用戶jdbc驗證
##
#配置數據庫連接
cas.authn.jdbc.query[0].driverClass=com.mysql.cj.jdbc.Driver
cas.authn.jdbc.query[0].url=jdbc:mysql://10.10.14.199:3306/testshiro?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
cas.authn.jdbc.query[0].user=root
cas.authn.jdbc.query[0].password=123456
#添加jdbc認證
cas.authn.jdbc.query[0].sql=SELECT * FROM user_info WHERE username =?
#哪個字段作為密碼字段
cas.authn.jdbc.query[0].fieldPassword=password
#哪個字段作為過期字段 0:未過期  1:已過期
cas.authn.jdbc.query[0].fieldExpired=expired
#哪個字段作為是否可用字段 0:未禁用  1:已禁用
cas.authn.jdbc.query[0].fieldDisabled=disabled
#MD5設置
cas.authn.jdbc.query[0].passwordEncoder.type=DEFAULT
cas.authn.jdbc.query[0].passwordEncoder.characterEncoding=UTF-8
cas.authn.jdbc.query[0].passwordEncoder.encodingAlgorithm=MD5

 

##
# 加鹽MD5用戶jdbc驗證
##
#配置數據庫連接
cas.authn.jdbc.encode[0].driverClass=com.mysql.cj.jdbc.Driver
cas.authn.jdbc.encode[0].url=jdbc:mysql://10.10.14.199:3306/testshiro?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
cas.authn.jdbc.encode[0].user=root
cas.authn.jdbc.encode[0].password=123456
#加密迭代次數
cas.authn.jdbc.encode[0].numberOfIterations=2
#該列名的值可替代上面的值,但對密碼加密時必須取該值進行處理
cas.authn.jdbc.encode[0].numberOfIterationsFieldName=
#動態鹽值用的字段
cas.authn.jdbc.encode[0].saltFieldName=username
#靜態鹽值
cas.authn.jdbc.encode[0].staticSalt=654321
cas.authn.jdbc.encode[0].sql=SELECT * FROM user_info WHERE username =?
#對處理鹽值后的算法
cas.authn.jdbc.encode[0].algorithmName=MD5
#哪個字段作為密碼字段
cas.authn.jdbc.encode[0].passwordFieldName=password
#哪個字段作為過期字段 0:未過期  1:已過期
cas.authn.jdbc.encode[0].expiredFieldName=expired
#哪個字段作為是否可用字段 0:未禁用  1:已禁用
cas.authn.jdbc.encode[0].disabledFieldName=disabled

 

##
# 動態services
##
#配置數據庫連接
cas.serviceRegistry.jpa.driverClass=com.mysql.cj.jdbc.Driver
cas.serviceRegistry.jpa.url=jdbc:mysql://10.10.14.199:3306/testshiro?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&useSSL=false
cas.serviceRegistry.jpa.dialect=org.hibernate.dialect.MySQL5Dialect
cas.serviceRegistry.jpa.user=root
cas.serviceRegistry.jpa.password=123456
#連接池配置
cas.serviceRegistry.jpa.pool.suspension=false
cas.serviceRegistry.jpa.pool.minSize=6
cas.serviceRegistry.jpa.pool.maxSize=18
#下面兩項的配置不要超過mysql數據庫的wait_timeout和interactive_timeout兩項配置 cas.serviceRegistry.jpa.pool.maxWait=30 cas.serviceRegistry.jpa.pool.timeoutMillis=30 #默認為create-drop,表示每次啟動服務都會清除你之前注冊的cas服務 cas.serviceRegistry.jpa.ddlAuto=update

 


免責聲明!

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



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