mirror of
https://github.com/ZLMediaKit/ZLMediaKit.git
synced 2026-06-13 19:51:49 +08:00
url参数变更后再次鉴权;hls播放鉴权提到httpsession类中实现
This commit is contained in:
@@ -182,22 +182,20 @@ public:
|
||||
*/
|
||||
HttpServerCookie::Ptr getCookie(const string &cookie_name,const StrCaseMap &http_header);
|
||||
|
||||
/**
|
||||
* 根据uid获取cookie
|
||||
* @param cookie_name cookie名,例如MY_SESSION
|
||||
* @param uid 用户id
|
||||
* @return cookie对象
|
||||
*/
|
||||
HttpServerCookie::Ptr getCookieByUid(const string &cookie_name,const string &uid);
|
||||
|
||||
/**
|
||||
* 删除cookie,用户登出时使用
|
||||
* @param cookie cookie对象,可以为nullptr
|
||||
* @return
|
||||
*/
|
||||
bool delCookie(const HttpServerCookie::Ptr &cookie);
|
||||
|
||||
|
||||
/**
|
||||
* 获取某用户名下最先登录时的cookie,目的是实现某用户下最多登录若干个设备
|
||||
* @param cookie_name cookie名,例如MY_SESSION
|
||||
* @param uid 用户id
|
||||
* @param max_client 最多登录的设备个数
|
||||
* @return 最早的cookie随机字符串
|
||||
*/
|
||||
string getOldestCookie(const string &cookie_name,const string &uid, int max_client = 1);
|
||||
private:
|
||||
HttpCookieManager();
|
||||
void onManager();
|
||||
@@ -217,6 +215,15 @@ private:
|
||||
*/
|
||||
void onDelCookie(const string &cookie_name,const string &uid,const string &cookie);
|
||||
|
||||
/**
|
||||
* 获取某用户名下最先登录时的cookie,目的是实现某用户下最多登录若干个设备
|
||||
* @param cookie_name cookie名,例如MY_SESSION
|
||||
* @param uid 用户id
|
||||
* @param max_client 最多登录的设备个数
|
||||
* @return 最早的cookie随机字符串
|
||||
*/
|
||||
string getOldestCookie(const string &cookie_name,const string &uid, int max_client = 1);
|
||||
|
||||
/**
|
||||
* 删除cookie
|
||||
* @param cookie_name cookie名,例如MY_SESSION
|
||||
|
||||
Reference in New Issue
Block a user