This repository has been archived by the owner on May 23, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
ITicketFactory
yueyinqiu edited this page Jan 23, 2021
·
4 revisions
ITicketFactory
can generate tickets and verify tickets.
Although it's called as ‘factory’ because it can generate something, it is more similar to ICaptchaAnswerSaver<TAnswer>
instead of ICaptchaFactory<TCaptchaDisplay, TAnswer>
since the tickets should be directly saved by the ITicketFactory
.
GenerateNewAsync(CancellationToken)
will mostly be invoked by a ICaptchaFactory<TCaptchaDisplay, TAnswer>
, while VerifyAsync(string, CancellationToken)
will mostly be invoked by a captcha-required action.
We recommend VerifyAsync(string, CancellationToken)
to make the ticket invalid in the meantime.
In this current repository:
NCaptcha.AnswerSavers.InMemoryGuidDictionary
NCaptcha.CaptchaFactories.Base
NCaptcha.CaptchaFactories.Image
NCaptcha.TicketFactories.InMemoryGuidDictionary
In other repositories: