Skip to content

Commit 1e678ad

Browse files
JWT signature is invalid. #25
1 parent 7a42c60 commit 1e678ad

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

samples/delphi/auth/samples.dproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@
7676
<UsingDelphiRTL>true</UsingDelphiRTL>
7777
<Icon_MainIcon>$(BDS)\bin\delphi_PROJECTICON.ico</Icon_MainIcon>
7878
<Icns_MainIcns>$(BDS)\bin\delphi_PROJECTICNS.icns</Icns_MainIcns>
79-
<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>
79+
<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>
8080
<DCC_Framework>VCL;$(DCC_Framework)</DCC_Framework>
8181
<SanitizedProjectName>samples</SanitizedProjectName>
8282
</PropertyGroup>

src/Horse.JWT.pas

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ procedure Middleware(AHorseRequest: THorseRequest;
180180
raise EHorseCallbackInterrupted.Create;
181181
end;
182182

183-
LToken := LToken.Replace('bearer ', '', [rfIgnoreCase]);
183+
LToken := Trim(LToken.Replace('bearer', '', [rfIgnoreCase]));
184184

185185
{$IFNDEF FPC}
186186
LBuilder := TJOSEConsumerBuilder

0 commit comments

Comments
 (0)