diff --git a/spring-security-rest-digest-auth/.classpath b/spring-security-rest-digest-auth/.classpath
new file mode 100644
index 0000000000..ca257cf1f9
--- /dev/null
+++ b/spring-security-rest-digest-auth/.classpath
@@ -0,0 +1,37 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spring-security-rest-digest-auth/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch b/spring-security-rest-digest-auth/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
new file mode 100644
index 0000000000..627021fb96
--- /dev/null
+++ b/spring-security-rest-digest-auth/.externalToolBuilders/org.eclipse.wst.jsdt.core.javascriptValidator.launch
@@ -0,0 +1,7 @@
+
+
+
+
+
+
+
diff --git a/spring-security-rest-digest-auth/.gitignore b/spring-security-rest-digest-auth/.gitignore
new file mode 100644
index 0000000000..83c05e60c8
--- /dev/null
+++ b/spring-security-rest-digest-auth/.gitignore
@@ -0,0 +1,13 @@
+*.class
+
+#folders#
+/target
+/neoDb*
+/data
+/src/main/webapp/WEB-INF/classes
+*/META-INF/*
+
+# Packaged files #
+*.jar
+*.war
+*.ear
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/.project b/spring-security-rest-digest-auth/.project
new file mode 100644
index 0000000000..7c28666685
--- /dev/null
+++ b/spring-security-rest-digest-auth/.project
@@ -0,0 +1,42 @@
+
+
+ spring-security-rest-digest-auth
+
+
+
+
+
+ org.eclipse.jdt.core.javabuilder
+
+
+
+
+ org.eclipse.wst.common.project.facet.core.builder
+
+
+
+
+ org.eclipse.wst.validation.validationbuilder
+
+
+
+
+ org.springframework.ide.eclipse.core.springbuilder
+
+
+
+
+ org.eclipse.m2e.core.maven2Builder
+
+
+
+
+
+ org.springframework.ide.eclipse.core.springnature
+ org.eclipse.jem.workbench.JavaEMFNature
+ org.eclipse.wst.common.modulecore.ModuleCoreNature
+ org.eclipse.jdt.core.javanature
+ org.eclipse.m2e.core.maven2Nature
+ org.eclipse.wst.common.project.facet.core.nature
+
+
diff --git a/spring-security-rest-digest-auth/.settings/.jsdtscope b/spring-security-rest-digest-auth/.settings/.jsdtscope
new file mode 100644
index 0000000000..7b3f0c8b9f
--- /dev/null
+++ b/spring-security-rest-digest-auth/.settings/.jsdtscope
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/spring-security-rest-digest-auth/.settings/org.eclipse.jdt.core.prefs b/spring-security-rest-digest-auth/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000000..df81356514
--- /dev/null
+++ b/spring-security-rest-digest-auth/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,95 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.annotation.missingNonNullByDefaultAnnotation=ignore
+org.eclipse.jdt.core.compiler.annotation.nonnull=org.eclipse.jdt.annotation.NonNull
+org.eclipse.jdt.core.compiler.annotation.nonnullbydefault=org.eclipse.jdt.annotation.NonNullByDefault
+org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nullable
+org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.comparingIdentical=warning
+org.eclipse.jdt.core.compiler.problem.deadCode=warning
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.explicitlyClosedAutoCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=disabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=error
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.includeNullInfoFromAsserts=disabled
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=error
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDefaultCase=ignore
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingEnumCaseDespiteDefault=disabled
+org.eclipse.jdt.core.compiler.problem.missingHashCodeMethod=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotationForInterfaceMethodImplementation=enabled
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=ignore
+org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=ignore
+org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.nullSpecViolation=error
+org.eclipse.jdt.core.compiler.problem.nullUncheckedConversion=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=warning
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.potentiallyUnclosedCloseable=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullAnnotation=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSpecificationOfTypeArguments=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBePotentiallyStatic=ignore
+org.eclipse.jdt.core.compiler.problem.reportMethodCanBeStatic=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressOptionalErrors=disabled
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=error
+org.eclipse.jdt.core.compiler.problem.unavoidableGenericTypeProblems=enabled
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.unclosedCloseable=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExceptionAndThrowable=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
+org.eclipse.jdt.core.compiler.source=1.7
diff --git a/spring-security-rest-digest-auth/.settings/org.eclipse.jdt.ui.prefs b/spring-security-rest-digest-auth/.settings/org.eclipse.jdt.ui.prefs
new file mode 100644
index 0000000000..471e9b0d81
--- /dev/null
+++ b/spring-security-rest-digest-auth/.settings/org.eclipse.jdt.ui.prefs
@@ -0,0 +1,55 @@
+#Sat Jan 21 23:04:06 EET 2012
+eclipse.preferences.version=1
+editor_save_participant_org.eclipse.jdt.ui.postsavelistener.cleanup=true
+sp_cleanup.add_default_serial_version_id=true
+sp_cleanup.add_generated_serial_version_id=false
+sp_cleanup.add_missing_annotations=true
+sp_cleanup.add_missing_deprecated_annotations=true
+sp_cleanup.add_missing_methods=false
+sp_cleanup.add_missing_nls_tags=false
+sp_cleanup.add_missing_override_annotations=true
+sp_cleanup.add_missing_override_annotations_interface_methods=true
+sp_cleanup.add_serial_version_id=false
+sp_cleanup.always_use_blocks=true
+sp_cleanup.always_use_parentheses_in_expressions=true
+sp_cleanup.always_use_this_for_non_static_field_access=false
+sp_cleanup.always_use_this_for_non_static_method_access=false
+sp_cleanup.convert_to_enhanced_for_loop=true
+sp_cleanup.correct_indentation=true
+sp_cleanup.format_source_code=true
+sp_cleanup.format_source_code_changes_only=true
+sp_cleanup.make_local_variable_final=true
+sp_cleanup.make_parameters_final=true
+sp_cleanup.make_private_fields_final=false
+sp_cleanup.make_type_abstract_if_missing_method=false
+sp_cleanup.make_variable_declarations_final=true
+sp_cleanup.never_use_blocks=false
+sp_cleanup.never_use_parentheses_in_expressions=false
+sp_cleanup.on_save_use_additional_actions=true
+sp_cleanup.organize_imports=true
+sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
+sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
+sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
+sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
+sp_cleanup.remove_private_constructors=true
+sp_cleanup.remove_trailing_whitespaces=true
+sp_cleanup.remove_trailing_whitespaces_all=true
+sp_cleanup.remove_trailing_whitespaces_ignore_empty=false
+sp_cleanup.remove_unnecessary_casts=true
+sp_cleanup.remove_unnecessary_nls_tags=false
+sp_cleanup.remove_unused_imports=true
+sp_cleanup.remove_unused_local_variables=false
+sp_cleanup.remove_unused_private_fields=true
+sp_cleanup.remove_unused_private_members=false
+sp_cleanup.remove_unused_private_methods=true
+sp_cleanup.remove_unused_private_types=true
+sp_cleanup.sort_members=false
+sp_cleanup.sort_members_all=false
+sp_cleanup.use_blocks=false
+sp_cleanup.use_blocks_only_for_return_and_throw=false
+sp_cleanup.use_parentheses_in_expressions=false
+sp_cleanup.use_this_for_non_static_field_access=true
+sp_cleanup.use_this_for_non_static_field_access_only_if_necessary=true
+sp_cleanup.use_this_for_non_static_method_access=true
+sp_cleanup.use_this_for_non_static_method_access_only_if_necessary=true
diff --git a/spring-security-rest-digest-auth/.settings/org.eclipse.m2e.core.prefs b/spring-security-rest-digest-auth/.settings/org.eclipse.m2e.core.prefs
new file mode 100644
index 0000000000..f897a7f1cb
--- /dev/null
+++ b/spring-security-rest-digest-auth/.settings/org.eclipse.m2e.core.prefs
@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1
diff --git a/spring-security-rest-digest-auth/.settings/org.eclipse.m2e.wtp.prefs b/spring-security-rest-digest-auth/.settings/org.eclipse.m2e.wtp.prefs
new file mode 100644
index 0000000000..ef86089622
--- /dev/null
+++ b/spring-security-rest-digest-auth/.settings/org.eclipse.m2e.wtp.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.m2e.wtp.enabledProjectSpecificPrefs=false
diff --git a/spring-security-rest-digest-auth/.settings/org.eclipse.wst.common.component b/spring-security-rest-digest-auth/.settings/org.eclipse.wst.common.component
new file mode 100644
index 0000000000..9e1a61e740
--- /dev/null
+++ b/spring-security-rest-digest-auth/.settings/org.eclipse.wst.common.component
@@ -0,0 +1,11 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/spring-security-rest-digest-auth/.settings/org.eclipse.wst.common.project.facet.core.xml b/spring-security-rest-digest-auth/.settings/org.eclipse.wst.common.project.facet.core.xml
new file mode 100644
index 0000000000..b46bc511b9
--- /dev/null
+++ b/spring-security-rest-digest-auth/.settings/org.eclipse.wst.common.project.facet.core.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/spring-security-rest-digest-auth/.settings/org.eclipse.wst.jsdt.ui.superType.container b/spring-security-rest-digest-auth/.settings/org.eclipse.wst.jsdt.ui.superType.container
new file mode 100644
index 0000000000..3bd5d0a480
--- /dev/null
+++ b/spring-security-rest-digest-auth/.settings/org.eclipse.wst.jsdt.ui.superType.container
@@ -0,0 +1 @@
+org.eclipse.wst.jsdt.launching.baseBrowserLibrary
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/.settings/org.eclipse.wst.jsdt.ui.superType.name b/spring-security-rest-digest-auth/.settings/org.eclipse.wst.jsdt.ui.superType.name
new file mode 100644
index 0000000000..05bd71b6ec
--- /dev/null
+++ b/spring-security-rest-digest-auth/.settings/org.eclipse.wst.jsdt.ui.superType.name
@@ -0,0 +1 @@
+Window
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/.settings/org.eclipse.wst.validation.prefs b/spring-security-rest-digest-auth/.settings/org.eclipse.wst.validation.prefs
new file mode 100644
index 0000000000..cacf5451ae
--- /dev/null
+++ b/spring-security-rest-digest-auth/.settings/org.eclipse.wst.validation.prefs
@@ -0,0 +1,14 @@
+DELEGATES_PREFERENCE=delegateValidatorList
+USER_BUILD_PREFERENCE=enabledBuildValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
+USER_MANUAL_PREFERENCE=enabledManualValidatorListorg.eclipse.jst.j2ee.internal.classpathdep.ClasspathDependencyValidator;
+USER_PREFERENCE=overrideGlobalPreferencestruedisableAllValidationfalseversion1.2.303.v201202090300
+eclipse.preferences.version=1
+override=true
+suspend=false
+vals/org.eclipse.jst.jsf.ui.JSFAppConfigValidator/global=FF01
+vals/org.eclipse.jst.jsp.core.JSPBatchValidator/global=FF01
+vals/org.eclipse.jst.jsp.core.JSPContentValidator/global=FF01
+vals/org.eclipse.jst.jsp.core.TLDValidator/global=FF01
+vals/org.eclipse.wst.dtd.core.dtdDTDValidator/global=FF01
+vals/org.eclipse.wst.jsdt.web.core.JsBatchValidator/global=TF02
+vf.version=3
diff --git a/spring-security-rest-digest-auth/.settings/org.eclipse.wst.ws.service.policy.prefs b/spring-security-rest-digest-auth/.settings/org.eclipse.wst.ws.service.policy.prefs
new file mode 100644
index 0000000000..9cfcabe16f
--- /dev/null
+++ b/spring-security-rest-digest-auth/.settings/org.eclipse.wst.ws.service.policy.prefs
@@ -0,0 +1,2 @@
+eclipse.preferences.version=1
+org.eclipse.wst.ws.service.policy.projectEnabled=false
diff --git a/spring-security-rest-digest-auth/.springBeans b/spring-security-rest-digest-auth/.springBeans
new file mode 100644
index 0000000000..a79097f40d
--- /dev/null
+++ b/spring-security-rest-digest-auth/.springBeans
@@ -0,0 +1,14 @@
+
+
+ 1
+
+
+
+
+
+
+ src/main/webapp/WEB-INF/api-servlet.xml
+
+
+
+
diff --git a/spring-security-rest-digest-auth/README.md b/spring-security-rest-digest-auth/README.md
new file mode 100644
index 0000000000..9030dffbd7
--- /dev/null
+++ b/spring-security-rest-digest-auth/README.md
@@ -0,0 +1,8 @@
+=========
+
+## Spring Security with RestTemplate - Example Project
+
+
+### Relevant Articles:
+- [RestTemplate with Basic Authentication in Spring](http://www.baeldung.com/2012/04/16/how-to-use-resttemplate-with-basic-authentication-in-spring-3-1)
+- [HttpClient Timeout](http://www.baeldung.com/httpclient-timeout)
diff --git a/spring-security-rest-digest-auth/pom.xml b/spring-security-rest-digest-auth/pom.xml
new file mode 100644
index 0000000000..8bd8cd7656
--- /dev/null
+++ b/spring-security-rest-digest-auth/pom.xml
@@ -0,0 +1,318 @@
+
+ 4.0.0
+ org.baeldung
+ spring-security-rest-digest-auth
+ 0.1-SNAPSHOT
+
+ spring-security-rest-digest-auth
+ war
+
+
+
+
+
+
+ org.springframework.security
+ spring-security-web
+ ${org.springframework.security.version}
+
+
+ org.springframework.security
+ spring-security-config
+ ${org.springframework.security.version}
+
+
+
+
+
+ org.springframework
+ spring-core
+ ${org.springframework.version}
+
+
+ commons-logging
+ commons-logging
+
+
+
+
+ org.springframework
+ spring-context
+ ${org.springframework.version}
+
+
+ org.springframework
+ spring-jdbc
+ ${org.springframework.version}
+
+
+ org.springframework
+ spring-beans
+ ${org.springframework.version}
+
+
+ org.springframework
+ spring-aop
+ ${org.springframework.version}
+
+
+ org.springframework
+ spring-tx
+ ${org.springframework.version}
+
+
+ org.springframework
+ spring-expression
+ ${org.springframework.version}
+
+
+
+ org.springframework
+ spring-web
+ ${org.springframework.version}
+
+
+ org.springframework
+ spring-webmvc
+ ${org.springframework.version}
+
+
+
+ org.springframework
+ spring-oxm
+ ${org.springframework.version}
+
+
+
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+ 2.2.2
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ org.apache.httpcomponents
+ httpcore
+ ${httpcore.version}
+
+
+ commons-logging
+ commons-logging
+
+
+
+
+
+ org.apache.httpcomponents
+ httpclient
+ ${httpclient.version}
+
+
+ commons-logging
+ commons-logging
+
+
+
+
+
+
+
+ javax.servlet
+ javax.servlet-api
+ 3.0.1
+ provided
+
+
+
+ javax.servlet
+ jstl
+ 1.2
+ runtime
+
+
+
+
+
+ com.google.guava
+ guava
+ ${guava.version}
+
+
+
+
+
+ org.slf4j
+ slf4j-api
+ ${org.slf4j.version}
+
+
+ ch.qos.logback
+ logback-classic
+ ${logback.version}
+
+
+
+ org.slf4j
+ jcl-over-slf4j
+ ${org.slf4j.version}
+
+
+
+ org.slf4j
+ log4j-over-slf4j
+ ${org.slf4j.version}
+
+
+
+
+
+ org.springframework
+ spring-test
+ ${org.springframework.version}
+ test
+
+
+
+ junit
+ junit-dep
+ ${junit.version}
+ test
+
+
+
+ org.hamcrest
+ hamcrest-core
+ ${org.hamcrest.version}
+ test
+
+
+ org.hamcrest
+ hamcrest-library
+ ${org.hamcrest.version}
+ test
+
+
+
+ org.mockito
+ mockito-core
+ ${mockito.version}
+ test
+
+
+
+
+
+ spring-security-rest-digest-auth
+
+
+ src/main/resources
+ true
+
+
+
+
+
+
+ org.apache.maven.plugins
+ maven-compiler-plugin
+ 3.1
+
+ 1.7
+ 1.7
+ true
+ source
+
+
+
+
+ org.apache.maven.plugins
+ maven-surefire-plugin
+ ${maven-surefire-plugin.version}
+
+
+ **/*LiveTest.java
+
+
+
+
+
+
+
+
+ org.codehaus.cargo
+ cargo-maven2-plugin
+ ${cargo-maven2-plugin.version}
+
+ true
+
+ jetty8x
+ embedded
+
+
+
+
+
+
+ 8082
+
+
+
+
+
+
+
+
+
+
+
+ 3.2.3.RELEASE
+ 3.1.4.RELEASE
+
+
+ 4.2.3.Final
+ 5.1.25
+
+
+ 4.2.4
+ 4.2.5
+
+
+ 1.7.5
+ 1.0.11
+
+
+ 5.0.1.Final
+
+
+ 14.0.1
+ 3.1
+
+
+ 1.3
+ 4.11
+ 1.9.5
+
+ 1.8.1
+ 1.8.9
+
+
+ 1.4.3
+ 2.15
+
+
+
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/src/main/java/org/baeldung/client/HttpComponentsClientHttpRequestFactoryBasicAuth.java b/spring-security-rest-digest-auth/src/main/java/org/baeldung/client/HttpComponentsClientHttpRequestFactoryBasicAuth.java
new file mode 100644
index 0000000000..5f808413ce
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/java/org/baeldung/client/HttpComponentsClientHttpRequestFactoryBasicAuth.java
@@ -0,0 +1,42 @@
+package org.baeldung.client;
+
+import java.net.URI;
+
+import org.apache.http.HttpHost;
+import org.apache.http.client.AuthCache;
+import org.apache.http.client.protocol.ClientContext;
+import org.apache.http.impl.auth.BasicScheme;
+import org.apache.http.impl.client.BasicAuthCache;
+import org.apache.http.protocol.BasicHttpContext;
+import org.apache.http.protocol.HttpContext;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
+
+public class HttpComponentsClientHttpRequestFactoryBasicAuth extends HttpComponentsClientHttpRequestFactory {
+ HttpHost host;
+
+ public HttpComponentsClientHttpRequestFactoryBasicAuth(final HttpHost host) {
+ super();
+ this.host = host;
+ }
+
+ //
+
+ @Override
+ protected HttpContext createHttpContext(final HttpMethod httpMethod, final URI uri) {
+ return createHttpContext();
+ }
+
+ private HttpContext createHttpContext() {
+ // Create AuthCache instance
+ final AuthCache authCache = new BasicAuthCache();
+ // Generate BASIC scheme object and add it to the local auth cache
+ final BasicScheme basicAuth = new BasicScheme();
+ authCache.put(host, basicAuth);
+ // Add AuthCache to the execution context
+ final BasicHttpContext localcontext = new BasicHttpContext();
+ localcontext.setAttribute(ClientContext.AUTH_CACHE, authCache);
+ return localcontext;
+ }
+
+}
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/src/main/java/org/baeldung/client/RestTemplateFactory.java b/spring-security-rest-digest-auth/src/main/java/org/baeldung/client/RestTemplateFactory.java
new file mode 100644
index 0000000000..e8df87524c
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/java/org/baeldung/client/RestTemplateFactory.java
@@ -0,0 +1,58 @@
+package org.baeldung.client;
+
+import org.apache.http.HttpHost;
+import org.apache.http.client.HttpClient;
+import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.HttpParams;
+import org.springframework.beans.factory.FactoryBean;
+import org.springframework.beans.factory.InitializingBean;
+import org.springframework.stereotype.Component;
+import org.springframework.web.client.RestTemplate;
+
+@Component
+public class RestTemplateFactory implements FactoryBean, InitializingBean {
+ private RestTemplate restTemplate;
+
+ public RestTemplateFactory() {
+ super();
+ }
+
+ // API
+
+ @Override
+ public RestTemplate getObject() {
+ return restTemplate;
+ }
+
+ @Override
+ public Class getObjectType() {
+ return RestTemplate.class;
+ }
+
+ @Override
+ public boolean isSingleton() {
+ return true;
+ }
+
+ @Override
+ public void afterPropertiesSet() {
+ final HttpHost host = new HttpHost("localhost", 8080, "http");
+ final HttpComponentsClientHttpRequestFactoryBasicAuth requestFactory = new HttpComponentsClientHttpRequestFactoryBasicAuth(host);
+ restTemplate = new RestTemplate(requestFactory);
+
+ final int timeout = 5;
+ final HttpClient httpClient = requestFactory.getHttpClient();
+ // - note: timeout via raw String parameters
+ // httpClient.getParams().setParameter("http.connection.timeout", timeout * 1000);
+ // httpClient.getParams().setParameter("http.socket.timeout", timeout * 1000);
+
+ // httpClient.getParams().setParameter("http.connection-manager.timeout", new Long(timeout * 1000));
+ // httpClient.getParams().setParameter("http.protocol.head-body-timeout", timeout * 1000);
+
+ // - note: timeout via the API
+ final HttpParams httpParams = httpClient.getParams();
+ HttpConnectionParams.setConnectionTimeout(httpParams, timeout * 1000); // http.connection.timeout
+ HttpConnectionParams.setSoTimeout(httpParams, timeout * 1000); // http.socket.timeout
+ }
+
+}
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/src/main/java/org/baeldung/client/spring/ClientConfig.java b/spring-security-rest-digest-auth/src/main/java/org/baeldung/client/spring/ClientConfig.java
new file mode 100644
index 0000000000..73e602855c
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/java/org/baeldung/client/spring/ClientConfig.java
@@ -0,0 +1,16 @@
+package org.baeldung.client.spring;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+
+@Configuration
+@ComponentScan("org.baeldung.client")
+public class ClientConfig {
+
+ public ClientConfig() {
+ super();
+ }
+
+ // beans
+
+}
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/src/main/java/org/baeldung/security/MySavedRequestAwareAuthenticationSuccessHandler.java b/spring-security-rest-digest-auth/src/main/java/org/baeldung/security/MySavedRequestAwareAuthenticationSuccessHandler.java
new file mode 100644
index 0000000000..698052fa2b
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/java/org/baeldung/security/MySavedRequestAwareAuthenticationSuccessHandler.java
@@ -0,0 +1,48 @@
+package org.baeldung.security;
+
+import java.io.IOException;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.security.core.Authentication;
+import org.springframework.security.web.authentication.SimpleUrlAuthenticationSuccessHandler;
+import org.springframework.security.web.savedrequest.HttpSessionRequestCache;
+import org.springframework.security.web.savedrequest.RequestCache;
+import org.springframework.security.web.savedrequest.SavedRequest;
+import org.springframework.util.StringUtils;
+
+public class MySavedRequestAwareAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler {
+
+ private RequestCache requestCache = new HttpSessionRequestCache();
+
+ @Override
+ public void onAuthenticationSuccess(final HttpServletRequest request, final HttpServletResponse response, final Authentication authentication) throws ServletException, IOException {
+ final SavedRequest savedRequest = requestCache.getRequest(request, response);
+
+ if (savedRequest == null) {
+ super.onAuthenticationSuccess(request, response, authentication);
+
+ return;
+ }
+ final String targetUrlParameter = getTargetUrlParameter();
+ if (isAlwaysUseDefaultTargetUrl() || (targetUrlParameter != null && StringUtils.hasText(request.getParameter(targetUrlParameter)))) {
+ requestCache.removeRequest(request, response);
+ super.onAuthenticationSuccess(request, response, authentication);
+
+ return;
+ }
+
+ clearAuthenticationAttributes(request);
+
+ // Use the DefaultSavedRequest URL
+ // final String targetUrl = savedRequest.getRedirectUrl();
+ // logger.debug("Redirecting to DefaultSavedRequest Url: " + targetUrl);
+ // getRedirectStrategy().sendRedirect(request, response, targetUrl);
+ }
+
+ public void setRequestCache(final RequestCache requestCache) {
+ this.requestCache = requestCache;
+ }
+}
diff --git a/spring-security-rest-digest-auth/src/main/java/org/baeldung/security/RestAuthenticationEntryPoint.java b/spring-security-rest-digest-auth/src/main/java/org/baeldung/security/RestAuthenticationEntryPoint.java
new file mode 100644
index 0000000000..77aa32ff97
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/java/org/baeldung/security/RestAuthenticationEntryPoint.java
@@ -0,0 +1,23 @@
+package org.baeldung.security;
+
+import java.io.IOException;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.security.core.AuthenticationException;
+import org.springframework.security.web.AuthenticationEntryPoint;
+import org.springframework.stereotype.Component;
+
+/**
+ * The Entry Point will not redirect to any sort of Login - it will return the 401
+ */
+@Component
+public final class RestAuthenticationEntryPoint implements AuthenticationEntryPoint {
+
+ @Override
+ public void commence(final HttpServletRequest request, final HttpServletResponse response, final AuthenticationException authException) throws IOException {
+ response.sendError(HttpServletResponse.SC_UNAUTHORIZED, "Unauthorized");
+ }
+
+}
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/src/main/java/org/baeldung/spring/SecSecurityConfig.java b/spring-security-rest-digest-auth/src/main/java/org/baeldung/spring/SecSecurityConfig.java
new file mode 100644
index 0000000000..4ce80dab9f
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/java/org/baeldung/spring/SecSecurityConfig.java
@@ -0,0 +1,16 @@
+package org.baeldung.spring;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.context.annotation.ImportResource;
+
+@Configuration
+@ImportResource({ "classpath:webSecurityConfig.xml" })
+@ComponentScan("org.baeldung.security")
+public class SecSecurityConfig {
+
+ public SecSecurityConfig() {
+ super();
+ }
+
+}
diff --git a/spring-security-rest-digest-auth/src/main/java/org/baeldung/spring/WebConfig.java b/spring-security-rest-digest-auth/src/main/java/org/baeldung/spring/WebConfig.java
new file mode 100644
index 0000000000..8c3d677af6
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/java/org/baeldung/spring/WebConfig.java
@@ -0,0 +1,31 @@
+package org.baeldung.spring;
+
+import java.util.List;
+
+import org.springframework.context.annotation.ComponentScan;
+import org.springframework.context.annotation.Configuration;
+import org.springframework.http.converter.HttpMessageConverter;
+import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter;
+import org.springframework.web.servlet.config.annotation.EnableWebMvc;
+import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
+
+@Configuration
+@EnableWebMvc
+@ComponentScan("org.baeldung.web")
+public class WebConfig extends WebMvcConfigurerAdapter {
+
+ public WebConfig() {
+ super();
+ }
+
+ // beans
+
+ @Override
+ public void configureMessageConverters(final List> converters) {
+ super.configureMessageConverters(converters);
+ converters.add(new MappingJackson2HttpMessageConverter());
+ }
+
+ //
+
+}
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/src/main/java/org/baeldung/web/controller/BarController.java b/spring-security-rest-digest-auth/src/main/java/org/baeldung/web/controller/BarController.java
new file mode 100644
index 0000000000..2bc314baa2
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/java/org/baeldung/web/controller/BarController.java
@@ -0,0 +1,31 @@
+package org.baeldung.web.controller;
+
+import org.baeldung.web.dto.Bar;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationEventPublisher;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+@Controller
+@RequestMapping(value = "/bars")
+public class BarController {
+
+ @Autowired
+ private ApplicationEventPublisher eventPublisher;
+
+ public BarController() {
+ super();
+ }
+
+ // API
+
+ @RequestMapping(value = "/{id}", method = RequestMethod.GET)
+ @ResponseBody
+ public Bar findOne(@PathVariable("id") final Long id) {
+ return new Bar();
+ }
+
+}
diff --git a/spring-security-rest-digest-auth/src/main/java/org/baeldung/web/controller/FooController.java b/spring-security-rest-digest-auth/src/main/java/org/baeldung/web/controller/FooController.java
new file mode 100644
index 0000000000..b50edb2dcf
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/java/org/baeldung/web/controller/FooController.java
@@ -0,0 +1,33 @@
+package org.baeldung.web.controller;
+
+import org.baeldung.web.dto.Foo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.context.ApplicationEventPublisher;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.stereotype.Controller;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
+
+@Controller
+@RequestMapping(value = "/foos")
+public class FooController {
+
+ @Autowired
+ private ApplicationEventPublisher eventPublisher;
+
+ public FooController() {
+ super();
+ }
+
+ // API
+
+ @RequestMapping(value = "/{id}", method = RequestMethod.GET)
+ @ResponseBody
+ @PreAuthorize("hasRole('ROLE_USER')")
+ public Foo findOne(@PathVariable("id") final Long id) {
+ return new Foo();
+ }
+
+}
diff --git a/spring-security-rest-digest-auth/src/main/java/org/baeldung/web/dto/Bar.java b/spring-security-rest-digest-auth/src/main/java/org/baeldung/web/dto/Bar.java
new file mode 100644
index 0000000000..d33e39a823
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/java/org/baeldung/web/dto/Bar.java
@@ -0,0 +1,14 @@
+package org.baeldung.web.dto;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class Bar implements Serializable {
+
+ public Bar() {
+ super();
+ }
+
+}
diff --git a/spring-security-rest-digest-auth/src/main/java/org/baeldung/web/dto/Foo.java b/spring-security-rest-digest-auth/src/main/java/org/baeldung/web/dto/Foo.java
new file mode 100644
index 0000000000..09c1dac933
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/java/org/baeldung/web/dto/Foo.java
@@ -0,0 +1,14 @@
+package org.baeldung.web.dto;
+
+import java.io.Serializable;
+
+import javax.xml.bind.annotation.XmlRootElement;
+
+@XmlRootElement
+public class Foo implements Serializable {
+
+ public Foo() {
+ super();
+ }
+
+}
diff --git a/spring-security-rest-digest-auth/src/main/resources/logback.xml b/spring-security-rest-digest-auth/src/main/resources/logback.xml
new file mode 100644
index 0000000000..90f61a95bc
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/resources/logback.xml
@@ -0,0 +1,22 @@
+
+
+
+
+ web - %date [%thread] %-5level %logger{36} - %message%n
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/src/main/resources/webSecurityConfig.xml b/spring-security-rest-digest-auth/src/main/resources/webSecurityConfig.xml
new file mode 100644
index 0000000000..e30e9120a1
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/resources/webSecurityConfig.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/src/main/webapp/WEB-INF/api-servlet.xml b/spring-security-rest-digest-auth/src/main/webapp/WEB-INF/api-servlet.xml
new file mode 100644
index 0000000000..5463820874
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/webapp/WEB-INF/api-servlet.xml
@@ -0,0 +1,6 @@
+
+
+
+
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/src/main/webapp/WEB-INF/web.xml b/spring-security-rest-digest-auth/src/main/webapp/WEB-INF/web.xml
new file mode 100644
index 0000000000..372688c8d8
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,51 @@
+
+
+
+ Spring Security Custom Application
+
+
+
+ contextClass
+
+ org.springframework.web.context.support.AnnotationConfigWebApplicationContext
+
+
+
+ contextConfigLocation
+ org.baeldung.spring
+
+
+
+ org.springframework.web.context.ContextLoaderListener
+
+
+
+
+ api
+ org.springframework.web.servlet.DispatcherServlet
+ 1
+
+
+ api
+ /api/*
+
+
+
+
+
+ springSecurityFilterChain
+ org.springframework.web.filter.DelegatingFilterProxy
+
+
+ springSecurityFilterChain
+ /*
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/spring-security-rest-digest-auth/src/test/java/org/baeldung/client/ClientLiveTest.java b/spring-security-rest-digest-auth/src/test/java/org/baeldung/client/ClientLiveTest.java
new file mode 100644
index 0000000000..f63537ae6b
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/test/java/org/baeldung/client/ClientLiveTest.java
@@ -0,0 +1,38 @@
+package org.baeldung.client;
+
+import org.apache.http.auth.AuthScope;
+import org.apache.http.auth.UsernamePasswordCredentials;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.baeldung.client.spring.ClientConfig;
+import org.baeldung.web.dto.Foo;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.ResponseEntity;
+import org.springframework.http.client.HttpComponentsClientHttpRequestFactory;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.support.AnnotationConfigContextLoader;
+import org.springframework.web.client.RestTemplate;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = { ClientConfig.class }, loader = AnnotationConfigContextLoader.class)
+public class ClientLiveTest {
+
+ @Autowired
+ private RestTemplate restTemplate;
+
+ // tests
+
+ @Test
+ public final void whenSecuredRestApiIsConsumed_then200OK() {
+ final HttpComponentsClientHttpRequestFactory requestFactory = (HttpComponentsClientHttpRequestFactory) restTemplate.getRequestFactory();
+ final DefaultHttpClient httpClient = (DefaultHttpClient) requestFactory.getHttpClient();
+ httpClient.getCredentialsProvider().setCredentials(new AuthScope("localhost", 8080, AuthScope.ANY_REALM), new UsernamePasswordCredentials("user", "userPass"));
+
+ final ResponseEntity responseEntity = restTemplate.exchange("http://localhost:8080/spring-security-rest-digest-auth/api/foos/1", HttpMethod.GET, null, Foo.class);
+ System.out.println(responseEntity.getStatusCode());
+ }
+
+}
diff --git a/spring-security-rest-digest-auth/src/test/java/org/baeldung/client/RawClientLiveTest.java b/spring-security-rest-digest-auth/src/test/java/org/baeldung/client/RawClientLiveTest.java
new file mode 100644
index 0000000000..a535c246ef
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/test/java/org/baeldung/client/RawClientLiveTest.java
@@ -0,0 +1,67 @@
+package org.baeldung.client;
+
+import java.io.IOException;
+import java.util.Timer;
+import java.util.TimerTask;
+
+import org.apache.http.HttpResponse;
+import org.apache.http.client.ClientProtocolException;
+import org.apache.http.client.methods.HttpGet;
+import org.apache.http.client.params.ClientPNames;
+import org.apache.http.impl.client.DefaultHttpClient;
+import org.apache.http.params.CoreConnectionPNames;
+import org.apache.http.params.HttpConnectionParams;
+import org.apache.http.params.HttpParams;
+import org.baeldung.client.spring.ClientConfig;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.test.context.ContextConfiguration;
+import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
+import org.springframework.test.context.support.AnnotationConfigContextLoader;
+
+@RunWith(SpringJUnit4ClassRunner.class)
+@ContextConfiguration(classes = { ClientConfig.class }, loader = AnnotationConfigContextLoader.class)
+public class RawClientLiveTest {
+
+ // tests
+
+ @Test
+ public final void whenSecuredRestApiIsConsumed_then200OK() throws ClientProtocolException, IOException {
+ final DefaultHttpClient httpClient = new DefaultHttpClient();
+
+ final int timeout = 20; // seconds
+ final HttpParams httpParams = httpClient.getParams();
+ configureViaRawApi(timeout, httpParams);
+ // configureViaHighLevelApi(timeout, httpParams);
+
+ final HttpGet getMethod = new HttpGet("http://localhost:8080/spring-security-rest-digest-auth/api/bars/1");
+
+ final int hardTimeout = 5; // seconds
+ final TimerTask task = new TimerTask() {
+ @Override
+ public void run() {
+ if (getMethod != null) {
+ getMethod.abort();
+ }
+ }
+ };
+ new Timer(true).schedule(task, hardTimeout * 1000);
+
+ final HttpResponse response = httpClient.execute(getMethod);
+ System.out.println("HTTP Status of response: " + response.getStatusLine().getStatusCode());
+ }
+
+ // util
+
+ final void configureViaHighLevelApi(final int timeout, final HttpParams httpParams) {
+ HttpConnectionParams.setConnectionTimeout(httpParams, timeout * 1000); // http.connection.timeout
+ HttpConnectionParams.setSoTimeout(httpParams, timeout * 1000); // http.socket.timeout
+ httpParams.setParameter(ClientPNames.CONN_MANAGER_TIMEOUT, new Long(timeout * 1000));
+ }
+
+ final void configureViaRawApi(final int timeout, final HttpParams httpParams) {
+ httpParams.setParameter(CoreConnectionPNames.CONNECTION_TIMEOUT, timeout * 1000);
+ httpParams.setParameter(CoreConnectionPNames.SO_TIMEOUT, timeout * 1000);
+ httpParams.setParameter(ClientPNames.CONN_MANAGER_TIMEOUT, new Long(timeout * 1000));
+ }
+}
diff --git a/spring-security-rest-digest-auth/src/test/resources/.gitignore b/spring-security-rest-digest-auth/src/test/resources/.gitignore
new file mode 100644
index 0000000000..83c05e60c8
--- /dev/null
+++ b/spring-security-rest-digest-auth/src/test/resources/.gitignore
@@ -0,0 +1,13 @@
+*.class
+
+#folders#
+/target
+/neoDb*
+/data
+/src/main/webapp/WEB-INF/classes
+*/META-INF/*
+
+# Packaged files #
+*.jar
+*.war
+*.ear
\ No newline at end of file
diff --git a/spring-security-rest-template/src/main/resources/webSecurityConfig.xml b/spring-security-rest-template/src/main/resources/webSecurityConfig.xml
index fa64cf242a..e30e9120a1 100644
--- a/spring-security-rest-template/src/main/resources/webSecurityConfig.xml
+++ b/spring-security-rest-template/src/main/resources/webSecurityConfig.xml
@@ -6,7 +6,7 @@
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd">
-
+
@@ -21,5 +21,5 @@
-
+
\ No newline at end of file