Skip to content

Commit

Permalink
cleanup work
Browse files Browse the repository at this point in the history
  • Loading branch information
eugenp committed Oct 26, 2015
1 parent 1ef53e2 commit 1da86e7
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

public class HttpClientAuthLiveTest {

private static final String URL_SECURED_BY_BASIC_AUTHENTICATION = "http://localhost:8080/spring-security-rest-basic-auth/api/foos/1";
private static final String URL_SECURED_BY_BASIC_AUTHENTICATION = "http://localhost:8081/spring-security-rest-basic-auth/api/foos/1";
private static final String DEFAULT_USER = "user1";
private static final String DEFAULT_PASS = "user1Pass";

Expand Down Expand Up @@ -99,7 +99,7 @@ public final void givenAuthorizationHeaderIsSetManually_whenExecutingGetRequest_
public final void givenAuthorizationHeaderIsSetManually_whenExecutingGetRequest_thenSuccess2() throws ClientProtocolException, IOException {
final HttpGet request = new HttpGet(URL_SECURED_BY_BASIC_AUTHENTICATION);
final String auth = DEFAULT_USER + ":" + DEFAULT_PASS;
final byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(Charset.forName("US-ASCII")));
final byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(Charset.forName("ISO-8859-1")));
final String authHeader = "Basic " + new String(encodedAuth);
request.setHeader(HttpHeaders.AUTHORIZATION, authHeader);

Expand Down Expand Up @@ -139,7 +139,7 @@ private final HttpContext context() {

private final String authorizationHeader(final String username, final String password) {
final String auth = username + ":" + password;
final byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(Charset.forName("US-ASCII")));
final byte[] encodedAuth = Base64.encodeBase64(auth.getBytes(Charset.forName("ISO-8859-1")));
final String authHeader = "Basic " + new String(encodedAuth);

return authHeader;
Expand Down
6 changes: 6 additions & 0 deletions spring-katharsis/.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
Expand All @@ -25,5 +30,6 @@
<nature>org.springframework.ide.eclipse.core.springnature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>
12 changes: 6 additions & 6 deletions spring-security-rest-basic-auth/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -287,16 +287,16 @@

<properties>
<!-- Spring -->
<org.springframework.version>4.2.0.RELEASE</org.springframework.version>
<org.springframework.version>4.2.2.RELEASE</org.springframework.version>
<org.springframework.security.version>4.0.2.RELEASE</org.springframework.security.version>

<!-- persistence -->
<hibernate.version>4.3.11.Final</hibernate.version>
<mysql-connector-java.version>5.1.36</mysql-connector-java.version>

<!-- http -->
<httpcore.version>4.4.1</httpcore.version>
<httpclient.version>4.5</httpclient.version>
<httpcore.version>4.4.3</httpcore.version>
<httpclient.version>4.5.1</httpclient.version>

<!-- logging -->
<org.slf4j.version>1.7.12</org.slf4j.version>
Expand All @@ -314,13 +314,13 @@
<junit.version>4.11</junit.version>
<mockito.version>1.10.19</mockito.version>

<rest-assured.version>2.4.1</rest-assured.version>
<rest-assured.version>2.6.0</rest-assured.version>

<!-- Maven plugins -->
<maven-compiler-plugin.version>3.3</maven-compiler-plugin.version>
<maven-war-plugin.version>2.6</maven-war-plugin.version>
<maven-surefire-plugin.version>2.18.1</maven-surefire-plugin.version>
<cargo-maven2-plugin.version>1.4.15</cargo-maven2-plugin.version>
<maven-surefire-plugin.version>2.19</maven-surefire-plugin.version>
<cargo-maven2-plugin.version>1.4.16</cargo-maven2-plugin.version>

</properties>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<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"
xsi:schemaLocation="
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.2.xsd
http://www.springframework.org/schema/security/spring-security-4.0.xsd
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.1.xsd"
http://www.springframework.org/schema/beans/spring-beans-4.2.xsd"
>

<http create-session="stateless" use-expressions="true">
Expand Down

0 comments on commit 1da86e7

Please sign in to comment.