Package org.dspace.eperson
Class AltchaCaptchaServiceImpl
java.lang.Object
org.dspace.eperson.AltchaCaptchaServiceImpl
- All Implemented Interfaces:
CaptchaService
Basic services implementation for a Proof of Work Captcha like Altcha.
Unlike Google ReCaptcha, there is no remote API or service to rely on, we simply
compare the client-side crypto puzzle challenge to our own work and pass or fail the validation that way
See https://altcha.org/docs/server-integration for implementation pseudocode.
- Author:
- Kim Shepherd
- See Also:
-
for REST impl
-
Field Summary
Fields inherited from interface org.dspace.eperson.service.CaptchaService
REGISTER_ACTION -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidinit()voidprocessResponse(String captchaPayloadHeader, String action) Process a response string and validate as per interface
-
Constructor Details
-
AltchaCaptchaServiceImpl
public AltchaCaptchaServiceImpl()
-
-
Method Details
-
init
@PostConstruct public void init() -
processResponse
public void processResponse(String captchaPayloadHeader, String action) throws InvalidReCaptchaException Process a response string and validate as per interface- Specified by:
processResponsein interfaceCaptchaService- Parameters:
captchaPayloadHeader- reCaptcha token to be validatedaction- action of reCaptcha- Throws:
InvalidReCaptchaException
-