gpt4 book ai didi

go - 验证码超时

转载 作者:IT王子 更新时间:2023-10-29 01:43:01 33 4
gpt4 key购买 nike

为什么我需要验证码超时实现。它有什么用处?

github上看golang验证码link ,这里的过期时间是10分钟。程序员出于什么原因实现了验证码的过期时间。

最佳答案

package captcha

import "github.com/dchest/cap

To make captchas one-time, the package includes a memory storage that stores captcha ids, their solutions, and expiration time. Used captchas are removed from the store immediately after calling Verify or VerifyString, while unused captchas (user loaded a page with captcha, but didn't submit the form) are collected automatically after the predefined expiration time.

阅读 captcha 包文档。

关于go - 验证码超时,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26797559/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com