如何在Web API控制器中的会话中存储和访问值

时间:2018-08-23 21:10:42

标签: asp.net-web-api

您好,我正在制作一个Web API应用程序,我想在注册时使用OTP验证,并且我想将此值存储在会话中,然后再与用户输入的otp代码进行匹配,那么我该如何实现这个。

我的控制器代码如下所示

library(stringr)

replacePunctuation <- function(x){
  # if there are multiple punctuations replace them
  str_replace(x, pattern = "[[:punct:]]{2,}", " ")
}

sample_data <- c("2 or more punctuations - Are you still.....there?", 
                   "only one punctuation - Are you still, here?")


replacePunctuation(sample_data)
#> [1] "2 or more punctuations - Are you still there?"
#> [2] "only one punctuation - Are you still, here?"

我想将其存储在会话中,并与用户otp在jquery ajax中与enter匹配,请帮助我

0 个答案:

没有答案