2.23online 增加用户活跃度日志输出
online-log统计用户活跃度:每个月,一个用户在站点登录一次online,算一次活跃,云许可这种不算,试用许可算,MK的登录里面需要增加日志,并且收集起来,然后onlinelog里面增加收集到数据库,增加页面统计,增加下载表格试用许可:
trialLicenseLog={product=SuperMap iDesktop, signature=dd, ip=127.0.0.1, userId=592862, realName=刘琛运, phone=17783116571, zone=北京,series=9D, name=刘琛运, nickname=liuchenyun, company=超图, tel=13883190518, email=null, username=柠檬草精灵}
用户名密码登录:
sso_UserLogin={"userId":"1","ipAddr":"127.0.0.1","nickname":"111111","email":"","tel":"","time":"2020-12-03 11:40:24"} 和 ICloudUser表信息
第三方登录
Third openid oGc7U6XIhx6-qwTngA1Htejl5-PY,oauth_nickname 金霖,oauth_supplier WeChat
在特定地方拿user信息1. 试用许可算登录
格式:json,value全为string
用户名密码登录:(可拿信息:cas库的user表)
user_Activity={"userId":"1","nickname":"111111","email":"1210737580@qq.com","tel":"13883190510","telArea":"86","realName":"liuchenyun","company":"2222","ipAddr":"127.0.0.1","time":"2021-02-24 10:08:01","type":"login_password"}
第三方登录 (可拿信息:cas库的user表和authentications表)
user_Activity={"userId":"944955","nickname":"liuchenyun2","email":"ogc7u6djo1dv4z49x-hxz1kwguhk_icloud@isupermap.com","tel":"12322323233","telArea":"11","realName":"zhangsan","company":"chaotu","ipAddr":"127.0.0.1","time":"2021-02-24 10:59:45","type":"login_WeChat"}
试用许可
user_Activity={"userId":"324366","nickname":"OnlineTest","email":"supermapoltest@163.com","tel":"10296332480","telArea":"","realName":"刘琛运","company":"超图","ipAddr":"127.0.0.1","time":"2021-02-24 14:03:34","type":"appliy_triallicense"}{"bindingStatus":{"checkEmail":false,"checkPassword":false,"checkPhone":false},"company":"2222","confirmedAt":1601164580000,"createdAt":1601164580000,"currentSignInAt":1614110010000,"currentSignInIp":"127.0.0.1","email":"1210737580@qq.com","encryptedPassword":"","lastSignInAt":1614109951000,"lastSignInIp":"127.0.0.1","nickname":"111111","realName":"liuchenyun","resetPasswordSentAt":0,"signInCount":535,"tel":"13883190510","telArea":"86","userId":1}https://sso.supermap.com/v101/cas/login?service=https://itest.supermapol.com/shiro-cas
http://127.0.0.1:8080/cas/login?service=http://127.0.0.1:8080/shiro-cas
https://sso.supermap.com/v101/cas/login?service=https://itest.supermapol.com/shiro-cas?jsessionid=ABF546A46D46C8EC8E851D7293325C64<=LT-141-KElvPkg5EwiBYUeXCFvkjvWW26lqJQ-sso.supermap.com&execution=e1s1&username=liuchenyun&password=qq1994724
{
"jsessionid":"4945CD7A04A90CC335A546F1E3CD8E3F",
"lt":"LT-2-bhMiEToUT9PFVqnPql1H1XhmMuZCIc-127.0.0.1:8080",
"execution":"e1s1",
"_eventId":"submit",
"username":"111111",
"password":"111111"
}
http://127.0.0.1:8080/cas/login?service=http://127.0.0.1:8080/account/manager/manager.do?manager=accountInfo
username: 111111
password: FLgyShSjQCYVzG5ZRSwUEFCoOc9ShQFLoKEfvvcgL/PraaRb2aurkOv3/36TcVEQYBYHJH1aQH3fZ9tkskrSjiWzqIx4GVfk2wVWGjJ1SseaNwl4ocE4u7ZtpdQ/qP2mp5fqHCqh+flZOp7TCTj01enJ+QKSC7KAoxuYxNkf5Wo=
passwordEncrypted: true
lt: LT-14-W0nzXHk2EMoKyNbJozgulwyt0XZwxn-127.0.0.1:8080
execution: e1s1
_eventId: submit
#浏览器白名单:用于记录用户活跃度日志
browser-whitelist.user-activity=Mozilla,Opera,UC登录方式:
第三方登录(qq,wechat,weibo)
登录:
浏览器登录:mk(主站页)和sso(登录页)
json登录(其他端)
接口登录(云许可)
接口登录和浏览器登录区别: 浏览器登录需要在网页上输出用户名密码,而接口登录用接口访问时带用户名密码参数
json登录和浏览器登录区别: json登录里的url带有.json or ?format=json User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140 Safari/537.36 Edge/17.17134
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko
sso 用户活跃度日志输出:新增记录第三方登录,记录浏览器方式登录,不记录云许可,移动端,桌面端等接口方式登录 review by wanglan
class org.springframework.webflow.context.servlet.ServletExternalContext
class org.springframework.webflow.context.servlet.ServletExternalContext#extrct url config
service.http-schema=http
service.domain=127.0.0.1:8080
#�˴�contextPath��Ϊ�գ�ֻ������Ϊ"",��������Ϊ"/"
cas-service.context-path=/accounts
account-service.context-path=/CASManager
#sso��¼֮���Ĭ�ϻ�����ַ
#icloud.default.serviceUrl=http\://www.supermapol.com/shiro-cas
icloud.default.serviceUrl=http\://192.168.13.242/shiro-cas
#onlineRootUrl=https://www.supermapol.com
onlineRootUrl=https://127.0.0.1:8080
#DB config
DBConfig.IP=39.100.90.131
DBConfig.PORT=8306
DBConfig.DBNAME=cas
DBConfig.USERNAME=root
DBConfig.PASSWORD=123456
#CreatUserIpWhiteList(value��ʽΪcfg4j�涨��map��ʽ ex: a=v1,b=v1)
ip-whitelist.account-create= EnterpriseCloud=121.41.42.182,GISTeaching1=103.254.67.162,GISTeaching2=1.202.165.40,\
DebugChengduLocal=127.0.0.1,gishost=123.57.138.204,liuyytest=119.6.63.64
#ip������
ip-whitelist.account-update=127.0.0.1;192.168.13.242;192.168.13.195
TEST_PHONE_LIST=10521693851,10296332424
TEST_EMAIL_LIST=10521693851_test@qq.com,10296332424_test@qq.com
TEST_VERIFYCODE=829180
#浏览器白名单:用于记录用户活跃度日志
browser-whitelist.user-activity=Mozilla,Opera,UC##输出格式统一
cas.log
2021-03-01 16:32:17,415 INFO [com.supermap.icloud.cas.services.UserService] - user_Activity={"userId":"592862","nickname":"liuchenyun","email":"","tel":"13883190518","telArea":"86","realName":"刘琛运j","company":"超图","ipAddr":"103.254.67.162","time":"2021-03-01 16:32:17","type":"login_browser"}
2021-03-04 09:56:48.295 INFO [com.isupermap.cloudmanagement.triallicense.rest.resources.TimeLicenseTrialResource] - trialLicenseLog={product=SuperMap iDesktop, signature=ee, ip=127.0.0.1, userId=324366, realName=刘琛运, phone=17783116571, zone=北京, series=9D, name=刘琛运, nickname=OnlineTest, company=超图, tel=10296332480, email=supermapoltest@163.com, username=柠檬草精灵}
2021-03-03 17:05:50.170 INFO 3260 --- [http-nio-8080-exec-6] c.i.c.t.r.r.TimeLicenseTrialResource : trialLicenseLog={product=SuperMap iDesktop, signature=55, ip=127.0.0.1, userId=324366, realName=刘琛运, phone=17783116571, zone=北京, series=9D, name=刘琛运, nickname=OnlineTest, company=超图, tel=10296332480, email=supermapoltest@163.com, username=柠檬草精灵} %-5level