@@ 182-184 (lines=3) @@ | ||
179 | throw new Error('ClientData type is invalid', ERR_BAD_TYPE); |
|
180 | } |
|
181 | ||
182 | if(isset($cli->origin) && $cli->origin !== $request->appId) { |
|
183 | throw new Error('App ID does not match the origin', ERR_NO_MATCHING_ORIGIN); |
|
184 | } |
|
185 | ||
186 | $registration = new Registration(); |
|
187 | $offs = 1; |
|
@@ 315-317 (lines=3) @@ | ||
312 | if($req === null) { |
|
313 | throw new Error('No matching request found', ERR_NO_MATCHING_REQUEST ); |
|
314 | } |
|
315 | if(isset($decodedClient->origin) && $decodedClient->origin !== $req->appId) { |
|
316 | throw new Error('App ID does not match the origin', ERR_NO_MATCHING_ORIGIN); |
|
317 | } |
|
318 | foreach ($registrations as $reg) { |
|
319 | if( !is_object( $reg ) ) { |
|
320 | throw new \InvalidArgumentException('$registrations of doAuthenticate() method only accepts array of object.'); |