File tree Expand file tree Collapse file tree 4 files changed +17
-11
lines changed
httpclient/src/test/java/org/baeldung/httpclient/sec
spring-security-rest-basic-auth Expand file tree Collapse file tree 4 files changed +17
-11
lines changed Original file line number Diff line number Diff line change 3232
3333public class HttpClientAuthLiveTest {
3434
35- private static final String URL_SECURED_BY_BASIC_AUTHENTICATION = "http://localhost:8080 /spring-security-rest-basic-auth/api/foos/1" ;
35+ private static final String URL_SECURED_BY_BASIC_AUTHENTICATION = "http://localhost:8081 /spring-security-rest-basic-auth/api/foos/1" ;
3636 private static final String DEFAULT_USER = "user1" ;
3737 private static final String DEFAULT_PASS = "user1Pass" ;
3838
@@ -99,7 +99,7 @@ public final void givenAuthorizationHeaderIsSetManually_whenExecutingGetRequest_
9999 public final void givenAuthorizationHeaderIsSetManually_whenExecutingGetRequest_thenSuccess2 () throws ClientProtocolException , IOException {
100100 final HttpGet request = new HttpGet (URL_SECURED_BY_BASIC_AUTHENTICATION );
101101 final String auth = DEFAULT_USER + ":" + DEFAULT_PASS ;
102- final byte [] encodedAuth = Base64 .encodeBase64 (auth .getBytes (Charset .forName ("US-ASCII " )));
102+ final byte [] encodedAuth = Base64 .encodeBase64 (auth .getBytes (Charset .forName ("ISO-8859-1 " )));
103103 final String authHeader = "Basic " + new String (encodedAuth );
104104 request .setHeader (HttpHeaders .AUTHORIZATION , authHeader );
105105
@@ -139,7 +139,7 @@ private final HttpContext context() {
139139
140140 private final String authorizationHeader (final String username , final String password ) {
141141 final String auth = username + ":" + password ;
142- final byte [] encodedAuth = Base64 .encodeBase64 (auth .getBytes (Charset .forName ("US-ASCII " )));
142+ final byte [] encodedAuth = Base64 .encodeBase64 (auth .getBytes (Charset .forName ("ISO-8859-1 " )));
143143 final String authHeader = "Basic " + new String (encodedAuth );
144144
145145 return authHeader ;
Original file line number Diff line number Diff line change 55 <projects >
66 </projects >
77 <buildSpec >
8+ <buildCommand >
9+ <name >org.eclipse.wst.common.project.facet.core.builder</name >
10+ <arguments >
11+ </arguments >
12+ </buildCommand >
813 <buildCommand >
914 <name >org.eclipse.jdt.core.javabuilder</name >
1015 <arguments >
2530 <nature >org.springframework.ide.eclipse.core.springnature</nature >
2631 <nature >org.eclipse.jdt.core.javanature</nature >
2732 <nature >org.eclipse.m2e.core.maven2Nature</nature >
33+ <nature >org.eclipse.wst.common.project.facet.core.nature</nature >
2834 </natures >
2935</projectDescription >
Original file line number Diff line number Diff line change 287287
288288 <properties >
289289 <!-- Spring -->
290- <org .springframework.version>4.2.0 .RELEASE</org .springframework.version>
290+ <org .springframework.version>4.2.2 .RELEASE</org .springframework.version>
291291 <org .springframework.security.version>4.0.2.RELEASE</org .springframework.security.version>
292292
293293 <!-- persistence -->
294294 <hibernate .version>4.3.11.Final</hibernate .version>
295295 <mysql-connector-java .version>5.1.36</mysql-connector-java .version>
296296
297297 <!-- http -->
298- <httpcore .version>4.4.1 </httpcore .version>
299- <httpclient .version>4.5</httpclient .version>
298+ <httpcore .version>4.4.3 </httpcore .version>
299+ <httpclient .version>4.5.1 </httpclient .version>
300300
301301 <!-- logging -->
302302 <org .slf4j.version>1.7.12</org .slf4j.version>
314314 <junit .version>4.11</junit .version>
315315 <mockito .version>1.10.19</mockito .version>
316316
317- <rest-assured .version>2.4.1 </rest-assured .version>
317+ <rest-assured .version>2.6.0 </rest-assured .version>
318318
319319 <!-- Maven plugins -->
320320 <maven-compiler-plugin .version>3.3</maven-compiler-plugin .version>
321321 <maven-war-plugin .version>2.6</maven-war-plugin .version>
322- <maven-surefire-plugin .version>2.18.1 </maven-surefire-plugin .version>
323- <cargo-maven2-plugin .version>1.4.15 </cargo-maven2-plugin .version>
322+ <maven-surefire-plugin .version>2.19 </maven-surefire-plugin .version>
323+ <cargo-maven2-plugin .version>1.4.16 </cargo-maven2-plugin .version>
324324
325325 </properties >
326326
Original file line number Diff line number Diff line change 22<beans : beans xmlns =" http://www.springframework.org/schema/security" xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance" xmlns : beans =" http://www.springframework.org/schema/beans"
33 xsi : schemaLocation ="
44 http://www.springframework.org/schema/security
5- http://www.springframework.org/schema/security/spring-security-3.2 .xsd
5+ http://www.springframework.org/schema/security/spring-security-4.0 .xsd
66 http://www.springframework.org/schema/beans
7- http://www.springframework.org/schema/beans/spring-beans-4.1 .xsd"
7+ http://www.springframework.org/schema/beans/spring-beans-4.2 .xsd"
88>
99
1010 <http create-session =" stateless" use-expressions =" true" >
You can’t perform that action at this time.
0 commit comments