public virtual IssuedToken IssueToken(string consumerKey) { string token = Guid.NewGuid().ToString(); var tokenData = new IssuedToken { Token = token, TokenSecret = Guid.NewGuid().ToString(), ConsumerKey = consumerKey }; _tokens[token] = tokenData; return tokenData; }
public virtual bool IsUsable(IssuedToken token) { return (!token.Expires.HasValue || (token.Expires.Value >= DateTime.Now)) && (token.AllowableUses != AllowableTokenUses.None); }