/**
  * Authenticates the client - uses the client's configured authentication method and authenticates
  * the request.
  * 
  * @param RequestInterface $request
  * @param Client $client
  * @return Result
  */
 public function authenticate(RequestInterface $request, Client $client)
 {
     $clientAuthenticationInfo = $client->getAuthenticationInfo();
     $authenticationMethod = $clientAuthenticationInfo->getMethod();
     $authenticationMethodConfig = $this->getMethodConfig($authenticationMethod);
     $method = $this->getAuthenticationMethodFactory()->createAuthenticationMethod($authenticationMethodConfig);
     // $method = $this->getAuthenticationMethodFactory()->createMethod($clientAuthenticationInfo->getMethod());
     return $method->authenticate($clientAuthenticationInfo, $request->getHttpRequest());
 }
 /**
  * (non-PHPdoc)
  * @see \InoOicServer\Session\Hash\Generator\GeneratorInterface::generateRefreshToken()
  */
 public function generateRefreshToken(AccessToken $accessToken, Client $client)
 {
     $data = $accessToken->getToken() . $client->getId() . microtime(true) . 'refresh_token';
     return Hash::compute('sha1', $data);
 }
 public function testGetUserAuthenticationHandler()
 {
     $client = new Client\Client($this->_getClientData());
     $this->assertSame('dummy', $client->getUserAuthenticationHandler());
 }