| 1234567891011121314151617181920212223242526272829 |
- using dodohold.core;
- namespace molilian.core
- {
- public class AccessTokenCore
- {
- public AccessTokenDTO Get(string domain, string ticket)
- {
- string key = $"token:{ticket}";
- return RedisHelper.Get<AccessTokenDTO>(key);
- }
- public int Delete(string domain, string ticket)
- {
- string key = $"token:{ticket}";
- return Convert.ToInt32(RedisHelper.Del(key));
- }
- internal bool Create(AccessTokenDTO token)
- {
- string key = $"token:{token.AccessTicket}";
- return RedisHelper.Set(key, token, 86400 * 30);
- }
- }
- }
|