@@ -16,8 +16,9 @@ export default class Authorization {
1616 const check : Check = {
1717 warrants : [ checkWarrantParamsToCheckWarrant ( checkParams ) ] ,
1818 debug : checkParams . debug
19- }
20- if ( WarrantClient . config . authorizeEndpoint ) {
19+ } ;
20+
21+ if ( WarrantClient . config . authorizeEndpoint && options . warrantToken != "latest" ) {
2122 return this . makeEdgeCheckRequest ( check , options ) ;
2223 }
2324
@@ -31,7 +32,7 @@ export default class Authorization {
3132 debug : checkParams . debug
3233 } ;
3334
34- if ( WarrantClient . config . authorizeEndpoint ) {
35+ if ( WarrantClient . config . authorizeEndpoint && options . warrantToken != "latest" ) {
3536 return this . makeEdgeCheckRequest ( check , options ) ;
3637 }
3738
@@ -48,7 +49,7 @@ export default class Authorization {
4849 subject : featureCheckParams . subject ,
4950 context : featureCheckParams . context ,
5051 debug : featureCheckParams . debug
51- } , options )
52+ } , options ) ;
5253 }
5354
5455 public static async hasPermission ( permissionCheckParams : PermissionCheckParams , options : WarrantRequestOptions = { } ) : Promise < boolean > {
@@ -61,7 +62,7 @@ export default class Authorization {
6162 subject : permissionCheckParams . subject ,
6263 context : permissionCheckParams . context ,
6364 debug : permissionCheckParams . debug
64- } , options )
65+ } , options ) ;
6566 }
6667
6768 // Private methods
0 commit comments