original_string: public function handle(GetResponseEvent $event)
      {
          $request = BridgeRequest::createFromRequest($event->getRequest());
          $response = new BridgeResponse;
  
          if (!$this->oauth2Server->verifyResourceRequest($request, $response)) {
              return;
          }
  
          try {
              $token = $this->oauth2Server->getAccessTokenData($request);
              $token = $this->authenticationManager->authenticate(
                  new OAuth2Token(
                      $token['client_id'],
                      $token['user_id'],
                      $token['access_token'],
                      $this->providerKey,
                      [],
                      explode(" ", $token['scope'])
                  )
              );
              $this->tokenStorage->setToken($token);
          } catch (AuthenticationException $failed) {
              $this->handleAuthenticationError($event, $request, $failed);
          }
      }
code: public function handle(GetResponseEvent $event)
      {
          $request = BridgeRequest::createFromRequest($event->getRequest());
          $response = new BridgeResponse;
  
          if (!$this->oauth2Server->verifyResourceRequest($request, $response)) {
              return;
          }
  
          try {
              $token = $this->oauth2Server->getAccessTokenData($request);
              $token = $this->authenticationManager->authenticate(
                  new OAuth2Token(
                      $token['client_id'],
                      $token['user_id'],
                      $token['access_token'],
                      $this->providerKey,
                      [],
                      explode(" ", $token['scope'])
                  )
              );
              $this->tokenStorage->setToken($token);
          } catch (AuthenticationException $failed) {
              $this->handleAuthenticationError($event, $request, $failed);
          }
      }
code_tokens: public function handle ( GetResponseEvent $ event ) { $ request = BridgeRequest :: createFromRequest ( $ event -> getRequest ( ) ) ; $ response = new BridgeResponse ; if ( ! $ this -> oauth2Server -> verifyResourceRequest ( $ request , $ response ) ) { return ; } try { $ token = $ this -> oauth2Server -> getAccessTokenData ( $ request ) ; $ token = $ this -> authenticationManager -> authenticate ( new OAuth2Token ( $ token [ 'client_id' ] , $ token [ 'user_id' ] , $ token [ 'access_token' ] , $ this -> providerKey , [ ] , explode ( " " , $ token [ 'scope' ] ) ) ) ; $ this -> tokenStorage -> setToken ( $ token ) ; } catch ( AuthenticationException $ failed ) { $ this -> handleAuthenticationError ( $ event , $ request , $ failed ) ; } }
docstring: Handles basic authentication.
  
  @param GetResponseEvent $event A GetResponseEvent instance
docstring_tokens: Handles basic authentication .