Skip to content

Commit

Permalink
(#242) Bearer tokens should not be base64-encoded
Browse files Browse the repository at this point in the history
  • Loading branch information
kerrykimbrough committed Sep 1, 2022
1 parent af9385e commit 667a781
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ public static void writeAuthCredentialsDef( String testName, IndentedWriter targ
targetWriter.println();
targetWriter.println( "private String tcasesApiBearerCredentials() {");
targetWriter.indent();
targetWriter.println( "return String.format( \"Bearer %s\", asToken64( tcasesApiBearer()));");
targetWriter.println( "return String.format( \"Bearer %s\", tcasesApiBearer());");
targetWriter.unindent();
targetWriter.println( "}");
}
Expand All @@ -148,10 +148,6 @@ public static void writeAuthCredentialsDef( String testName, IndentedWriter targ
targetWriter.println( "return String.format( \"Basic %s\", asToken64( String.format( \"%s:%s\", tcasesApiUser(), tcasesApiPassword())));");
targetWriter.unindent();
targetWriter.println( "}");
}

if( dependencies.dependsAuthHttp())
{
targetWriter.println();
targetWriter.println( "private String asToken64( String value) {");
targetWriter.indent();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ private String tcasesApiBearer() {
}

private String tcasesApiBearerCredentials() {
return String.format( "Bearer %s", asToken64( tcasesApiBearer()));
return String.format( "Bearer %s", tcasesApiBearer());
}

private String tcasesApiUser() {
Expand Down

0 comments on commit 667a781

Please sign in to comment.