Skip to content

Commit

Permalink
Token authorization must not be in base 64.
Browse files Browse the repository at this point in the history
  • Loading branch information
Chavjoh committed Jan 26, 2024
1 parent 26d08dd commit cd8762a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.chavaillaz.client.common.security;

import static com.chavaillaz.client.common.utility.Utils.encodeBase64;

import java.util.function.BiConsumer;

import lombok.Getter;
Expand All @@ -18,7 +16,7 @@ public class TokenAuthentication extends AnonymousAuthentication {

@Override
public void fillHeaders(BiConsumer<String, String> addHeader) {
addHeader.accept("Authorization", "Bearer " + encodeBase64(getToken()));
addHeader.accept("Authorization", "Bearer " + getToken());
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ void testTokenAuthentication() {

String authorization = headers.get("Authorization");
assertNotNull(authorization);
assertEquals("Bearer VG9rZW4=", authorization);
assertEquals("Bearer Token", authorization);

Map<String, String> cookies = new HashMap<>();
authentication.fillCookies(cookies::put);
Expand Down

0 comments on commit cd8762a

Please sign in to comment.