public OAuthParameter(string consumerKey, string token, SignatureMethodType signatureMethod, DateTime timestamp, string nonce, OAuthVersionType version) { this.ConsumerKey = consumerKey; this.Token = token; this.SignatureMethod = GeneralUtil.SignatureMethodTypeToString(signatureMethod); this.Timestamp = this.DateTimeToUtcTicks(timestamp).ToString(); this.Nonce = nonce; this.Version = GeneralUtil.OAuthVersionTypeToString(version); }
public bool IsValidSignatureMethod() { if (this.SignatureMethod == GeneralUtil.SignatureMethodTypeToString(SignatureMethodType.HMAC_SHA1)) { return(true); } if (this.SignatureMethod == GeneralUtil.SignatureMethodTypeToString(SignatureMethodType.PLAINTEXT)) { return(true); } return(false); }