@@ -16,8 +16,9 @@ export default class Authorization {
16
16
const check : Check = {
17
17
warrants : [ checkWarrantParamsToCheckWarrant ( checkParams ) ] ,
18
18
debug : checkParams . debug
19
- }
20
- if ( WarrantClient . config . authorizeEndpoint ) {
19
+ } ;
20
+
21
+ if ( WarrantClient . config . authorizeEndpoint && options . warrantToken != "latest" ) {
21
22
return this . makeEdgeCheckRequest ( check , options ) ;
22
23
}
23
24
@@ -31,7 +32,7 @@ export default class Authorization {
31
32
debug : checkParams . debug
32
33
} ;
33
34
34
- if ( WarrantClient . config . authorizeEndpoint ) {
35
+ if ( WarrantClient . config . authorizeEndpoint && options . warrantToken != "latest" ) {
35
36
return this . makeEdgeCheckRequest ( check , options ) ;
36
37
}
37
38
@@ -48,7 +49,7 @@ export default class Authorization {
48
49
subject : featureCheckParams . subject ,
49
50
context : featureCheckParams . context ,
50
51
debug : featureCheckParams . debug
51
- } , options )
52
+ } , options ) ;
52
53
}
53
54
54
55
public static async hasPermission ( permissionCheckParams : PermissionCheckParams , options : WarrantRequestOptions = { } ) : Promise < boolean > {
@@ -61,7 +62,7 @@ export default class Authorization {
61
62
subject : permissionCheckParams . subject ,
62
63
context : permissionCheckParams . context ,
63
64
debug : permissionCheckParams . debug
64
- } , options )
65
+ } , options ) ;
65
66
}
66
67
67
68
// Private methods
0 commit comments