public function testUnauthorizedWrongK1() { $k1 = new K1("a665a45920422f9d417e4867efdc4fb8a04a1f3fff1fa07e998e86f7f7a27ae3"); $resource = new Slot("173af653133d964edfc16cafe0aba33c8f500a07f3ba3f81943916910c257709"); $authorization = new K1ResourceAuthorization(); $this->setExpectedException(UnauthorizedException::class); $authorization->authorize($resource, $k1); }
public function handle(Request $request, Closure $next) { $this->authorization->authorize($this->resource, $this->k1); return $next($request); }