public UserIdentity(string id = null, Ticket tk = null, string name = UserConstants.Anonymous, string type = UserConstants.CustomType) { uname = name; utype = type; uid = id ?? GenerateId(); uticket = tk ?? Ticket.NewTicket(); }
public virtual bool AuthTicket(string cs, Ticket tk = null) { var ticket = tk ?? GetTicket(); return ticket.Checksum(cs); }
public static Ticket NewTicket(bool isBase64 = true) { var t = new Ticket(); if (!isBase64) return t; t.Token = t.Token.Base64Encode(); t.Par = t.Par.Base64Encode(); return t; }