File tree Expand file tree Collapse file tree 7 files changed +91
-12
lines changed Expand file tree Collapse file tree 7 files changed +91
-12
lines changed Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ src/*.~*
32
32
* .identcache
33
33
* .projdata
34
34
* .tvsconfig
35
+ * .skincfg
35
36
* .dsk
36
37
* .dcu
37
38
* .exe
Original file line number Diff line number Diff line change 1
1
{
2
2
"hash" : " 445774d05b3e1b873cfcdb89032b3e1f" ,
3
- "updated" : " 2023-03-09T23:35:20.3502827 -03:00" ,
3
+ "updated" : " 2023-08-07T09:27:43.9207961 -03:00" ,
4
4
"installedModules" : {
5
5
"github.com/andre-djsystem/hashlib4pascal" : {
6
6
"name" : " hashlib4pascal" ,
12
12
},
13
13
"github.com/hashload/horse" : {
14
14
"name" : " horse" ,
15
- "version" : " 3.1.0 " ,
16
- "hash" : " fc3b8eefb46c1a3b387e86ca46a9faa1 " ,
15
+ "version" : " 3.1.4 " ,
16
+ "hash" : " 54665bed032fc96d1398bf5df6332754 " ,
17
17
"artifacts" : {},
18
18
"failed" : false ,
19
19
"changed" : false
Original file line number Diff line number Diff line change 7
7
"projects" : [],
8
8
"dependencies" : {
9
9
"github.com/andre-djsystem/hashlib4pascal" : " ^1.0.0" ,
10
- "github.com/hashload/horse" : " ^3.1.0 " ,
10
+ "github.com/hashload/horse" : " ^3.1.4 " ,
11
11
"github.com/paolo-rossi/delphi-jose-jwt" : " ^v3.2.0"
12
12
}
13
13
}
Original file line number Diff line number Diff line change 1
1
{
2
2
"hash" : " 6ef9161b900632671022358216c7dfe7" ,
3
- "updated" : " 2023-03-09T23:37:34.5596218 -03:00" ,
3
+ "updated" : " 2023-08-07T09:25:32.3870207 -03:00" ,
4
4
"installedModules" : {
5
5
"github.com/hashload/horse" : {
6
6
"name" : " horse" ,
7
- "version" : " 3.1.0 " ,
8
- "hash" : " fc3b8eefb46c1a3b387e86ca46a9faa1 " ,
7
+ "version" : " 3.1.4 " ,
8
+ "hash" : " 54665bed032fc96d1398bf5df6332754 " ,
9
9
"artifacts" : {},
10
10
"failed" : false ,
11
11
"changed" : false
Original file line number Diff line number Diff line change 6
6
"mainsrc" : " ./" ,
7
7
"projects" : [],
8
8
"dependencies" : {
9
- "github.com/hashload/horse" : " ^3.1.0 " ,
9
+ "github.com/hashload/horse" : " ^3.1.4 " ,
10
10
"github.com/paolo-rossi/delphi-jose-jwt" : " ^v3.2.0"
11
11
}
12
12
}
Load Diff Large diffs are not rendered by default.
Original file line number Diff line number Diff line change 1
1
unit Horse.JWT;
2
2
3
3
{ $IF DEFINED(FPC)}
4
- { $MODE DELPHI}{ $H+}
4
+ { $MODE DELPHI}{ $H+}
5
5
{ $ENDIF}
6
6
7
7
interface
@@ -224,8 +224,20 @@ procedure Middleware(AHorseRequest: THorseRequest; AHorseResponse: THorseRespons
224
224
LBuilder.SetRequireSubject;
225
225
end ;
226
226
227
- LJWT := TJOSEContext.Create(LToken, TJWTClaims);
228
227
try
228
+ LJWT := TJOSEContext.Create(LToken, TJWTClaims);
229
+ except
230
+ AHorseResponse.Send(UNAUTHORIZED).Status(THTTPStatus.Unauthorized);
231
+ raise EHorseCallbackInterrupted.Create(UNAUTHORIZED);
232
+ end ;
233
+
234
+ try
235
+ if LJWT.GetJOSEObject = nil then
236
+ begin
237
+ AHorseResponse.Send(UNAUTHORIZED).Status(THTTPStatus.Unauthorized);
238
+ raise EHorseCallbackInterrupted.Create(UNAUTHORIZED);
239
+ end ;
240
+
229
241
LValidations := LBuilder.Build;
230
242
try
231
243
LValidations.ProcessContext(LJWT);
You can’t perform that action at this time.
0 commit comments