Add reCaptcha as default implementation
Add support for enabling and disabling captcha
This commit is contained in:
@@ -44,6 +44,7 @@ database.password=
|
||||
#------------------------
|
||||
# GMAIL SMTP Configuration
|
||||
#------------------------
|
||||
mail.smtp.socketFactory.class=javax.net.ssl.SSLSocketFactory
|
||||
mail.smtp.socketFactory.port=587
|
||||
mail.smtp.auth = true
|
||||
mail.host=smtp.gmail.com
|
||||
@@ -54,19 +55,28 @@ mail.smtp.starttls.enable=true
|
||||
#------------------------
|
||||
# Domain address
|
||||
#------------------------
|
||||
|
||||
mail.registrationEmail=root@localhost
|
||||
mail.siteEmail=root@localhost
|
||||
|
||||
##################################################################################
|
||||
# Users Registration Configuration
|
||||
##################################################################################
|
||||
|
||||
# Enable/Disable user registration confirmation by e-mail. If it's enabled, mail must be configured.
|
||||
registration.email.enabled = false
|
||||
|
||||
# Enable captcha confirmation
|
||||
registration.recaptcha.enabled = false
|
||||
|
||||
# ReCaptcha is the default captcha. Public and private keys are required.
|
||||
# More Info: http://www.google.com/recaptcha
|
||||
registration.recaptcha.privateKey =
|
||||
registration.recaptcha.publicKey =
|
||||
|
||||
##################################################################################
|
||||
# Site configuration
|
||||
##################################################################################
|
||||
|
||||
# Enable/Disable user registration confirmation by e-mail. If it's enabled, mail must be configured.
|
||||
user.confirm.registration=false
|
||||
|
||||
# Site administration user. This user will have special permissions for operations such as removing users, set password
|
||||
# etc.
|
||||
admin.user = admin@wisemapping.org
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
log4j.rootLogger=WARN, stdout, R
|
||||
log4j.logger.com.wisemapping=WARN,stdout,R
|
||||
log4j.logger.org.springframework=DEBUG,stdout,R
|
||||
log4j.logger.org.springframework=WARN,stdout,R
|
||||
log4j.logger.org.codehaus.jackson=WARN,stdout,R
|
||||
|
||||
# Stdout logger <20>
|
||||
|
@@ -116,10 +116,10 @@
|
||||
|
||||
<bean id="userValidator" class="com.wisemapping.validator.UserValidator">
|
||||
<property name="userService" ref="userService"/>
|
||||
<property name="captchaService" ref="reCaptcha"/>
|
||||
</bean>
|
||||
|
||||
<bean id="userController" class="com.wisemapping.controller.UserController">
|
||||
<!--<property name="captchaService" ref="captchaService"/>-->
|
||||
<bean id="userController" class="com.wisemapping.controller.UserRegistrationController">
|
||||
<property name="sessionForm" value="false"/>
|
||||
<property name="commandName" value="user"/>
|
||||
<property name="commandClass" value="com.wisemapping.view.UserBean"/>
|
||||
@@ -127,7 +127,9 @@
|
||||
<property name="formView" value="userRegistration"/>
|
||||
<property name="successView" value="userRegistrationConfirmation"/>
|
||||
<property name="userService" ref="userService"/>
|
||||
<property name="emailConfirmEnabled" value="${user.confirm.registration}"/>
|
||||
<property name="emailConfirmEnabled" value="${registration.email.enabled}"/>
|
||||
<property name="captchaEnabled" value="${registration.recaptcha.enabled}"/>
|
||||
<property name="captchaService" ref="reCaptcha"/>
|
||||
</bean>
|
||||
|
||||
<bean id="forgotPasswordValidator" class="com.wisemapping.validator.ForgotPasswordValidator"/>
|
||||
@@ -275,10 +277,6 @@
|
||||
<property name="mindmapService" ref="mindmapService"/>
|
||||
</bean>
|
||||
|
||||
<!--<bean id="captchaController" class="com.wisemapping.controller.CaptchaController">-->
|
||||
<!--<property name="captchaService" ref="captchaService"/>-->
|
||||
<!--</bean>-->
|
||||
|
||||
<bean id="urlMapping" class="org.springframework.web.servlet.handler.SimpleUrlHandlerMapping">
|
||||
<property name="interceptors">
|
||||
<list>
|
||||
@@ -337,5 +335,9 @@
|
||||
<property name="paramName" value="language"/>
|
||||
</bean>
|
||||
|
||||
|
||||
<bean id="reCaptcha" class="net.tanesha.recaptcha.ReCaptchaImpl">
|
||||
<property name="privateKey" value="${registration.recaptcha.privateKey}"/>
|
||||
<property name="publicKey" value="${registration.recaptcha.publicKey}"/>
|
||||
<property name="includeNoscript" value="false"/>
|
||||
</bean>
|
||||
</beans>
|
Reference in New Issue
Block a user