Skip to content

Commit

Permalink
JWT signature is invalid. #25
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciussanchez committed Feb 14, 2022
1 parent 7a42c60 commit 1e678ad
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion samples/delphi/auth/samples.dproj
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
<UsingDelphiRTL>true</UsingDelphiRTL>
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
<Icns_MainIcns>$(BDS)\bin\delphi_PROJECTICNS.icns</Icns_MainIcns>
<DCC_UnitSearchPath>$(Horse);modules\.dcp;modules\.dcu;modules;modules\delphi-jose-jwt\Source\Common;modules\delphi-jose-jwt\Source\JOSE;modules\horse\src;modules\jhonson\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
<DCC_UnitSearchPath>$(Horse);$(DCC_UnitSearchPath);modules\.dcp;modules\.dcu;modules;modules\delphi-jose-jwt\Source\Common;modules\delphi-jose-jwt\Source\JOSE;modules\horse\src;modules\jhonson\src</DCC_UnitSearchPath>
<DCC_Framework>VCL;$(DCC_Framework)</DCC_Framework>
<SanitizedProjectName>samples</SanitizedProjectName>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Horse.JWT.pas
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ procedure Middleware(AHorseRequest: THorseRequest;
raise EHorseCallbackInterrupted.Create;
end;

LToken := LToken.Replace('bearer ', '', [rfIgnoreCase]);
LToken := Trim(LToken.Replace('bearer', '', [rfIgnoreCase]));

{$IFNDEF FPC}
LBuilder := TJOSEConsumerBuilder
Expand Down

0 comments on commit 1e678ad

Please sign in to comment.