Пример #1
0
 /// <summary>
 /// 验证是否是有效短信验证码。
 /// </summary>
 /// <returns>是否验证通过。</returns>
 /// <param name="mobilePhoneNumber">手机号</param>
 /// <param name="code">验证码。</param>
 public static Task <bool> VerifySmsCodeAsync(string code, string mobilePhoneNumber)
 {
     return(AVCloud.VerifySmsCodeAsync(code, mobilePhoneNumber, CancellationToken.None));
 }
Пример #2
0
 /// <summary>
 /// 请求发送验证码。
 /// </summary>
 /// <returns>是否发送成功。</returns>
 /// <param name="mobilePhoneNumber">手机号。</param>
 public static Task <bool> RequestSMSCodeAsync(string mobilePhoneNumber, CancellationToken cancellationToken)
 {
     return(AVCloud.RequestSMSCodeAsync(mobilePhoneNumber, null, null, 0, cancellationToken));
 }
Пример #3
0
 /// <summary>
 /// 请求短信认证。
 /// </summary>
 /// <param name="mobilePhoneNumber">手机号。</param>
 /// <param name="name">应用名称。</param>
 /// <param name="op">进行的操作名称。</param>
 /// <param name="ttl">验证码失效时间。</param>
 /// <returns></returns>
 public static Task <bool> RequestSMSCodeAsync(string mobilePhoneNumber, string name, string op, int ttl)
 {
     return(AVCloud.RequestSMSCodeAsync(mobilePhoneNumber, name, op, ttl, CancellationToken.None));
 }
Пример #4
0
 public static Task <bool> RequestSMSCode(string mobilePhoneNumber)
 {
     return(AVCloud.RequestSMSCode(mobilePhoneNumber, CancellationToken.None));
 }
Пример #5
0
 /// <summary>
 /// Verify the user's input of catpcha.
 /// </summary>
 /// <param name="code">User's input of this captcha.</param>
 /// <param name="cancellationToken">CancellationToken.</param>
 /// <returns></returns>
 public Task VerifyAsync(string code, CancellationToken cancellationToken = default(CancellationToken))
 {
     return(AVCloud.VerifyCaptchaAsync(code, Token));
 }