Beispiel #1
0
 public function validateRequest(RequestInterface $request, ResponseInterface $response)
 {
     if (!$request->request('client_id')) {
         $response->setError(400, 'invalid_request', 'Missing parameter: "client_id" is required');
         return false;
     }
     /*
      * Ensure that the client_id existed
      */
     $client_id = $request->request('client_id');
     if (!($client = $this->storage->getClientDetails($client_id))) {
         $response->setError(400, 'invalid_client', 'The client id supplied is invalid');
         return false;
     }
     $this->client = $client;
     return true;
 }
 /** @dataProvider provideStorage */
 public function testGetClientScope(ClientInterface $storage)
 {
     $this->assertEquals('clientscope1', $storage->getClientScope('oauth_test_client'));
     $this->assertFalse($storage->getClientScope('invalidclient'));
 }