original_string: public static function redirect(Url $url, $clientId, $redirectUri = null, $scope = null, $state = null)
      {
          $parameters = $url->getParameters();
          $parameters['response_type'] = 'code';
          $parameters['client_id']     = $clientId;
  
          if (isset($redirectUri)) {
              $parameters['redirect_uri'] = $redirectUri;
          }
  
          if (isset($scope)) {
              $parameters['scope'] = $scope;
          }
  
          if (isset($state)) {
              $parameters['state'] = $state;
          }
  
          throw new StatusCode\TemporaryRedirectException($url->withScheme('https')->withParameters($parameters)->toString());
      }
code: public static function redirect(Url $url, $clientId, $redirectUri = null, $scope = null, $state = null)
      {
          $parameters = $url->getParameters();
          $parameters['response_type'] = 'code';
          $parameters['client_id']     = $clientId;
  
          if (isset($redirectUri)) {
              $parameters['redirect_uri'] = $redirectUri;
          }
  
          if (isset($scope)) {
              $parameters['scope'] = $scope;
          }
  
          if (isset($state)) {
              $parameters['state'] = $state;
          }
  
          throw new StatusCode\TemporaryRedirectException($url->withScheme('https')->withParameters($parameters)->toString());
      }
code_tokens: public static function redirect ( Url $ url , $ clientId , $ redirectUri = null , $ scope = null , $ state = null ) { $ parameters = $ url -> getParameters ( ) ; $ parameters [ 'response_type' ] = 'code' ; $ parameters [ 'client_id' ] = $ clientId ; if ( isset ( $ redirectUri ) ) { $ parameters [ 'redirect_uri' ] = $ redirectUri ; } if ( isset ( $ scope ) ) { $ parameters [ 'scope' ] = $ scope ; } if ( isset ( $ state ) ) { $ parameters [ 'state' ] = $ state ; } throw new StatusCode \ TemporaryRedirectException ( $ url -> withScheme ( 'https' ) -> withParameters ( $ parameters ) -> toString ( ) ) ; }
docstring: Helper method to start the flow by redirecting the user to the
  authentication server. The getAccessToken method must be used when the
  server redirects the user back to the redirect uri
  
  @param \PSX\Uri\Url $url
  @param string $clientId
  @param string $redirectUri
  @param string $scope
  @param string $state
docstring_tokens: Helper method to start the flow by redirecting the user to the authentication server . The getAccessToken method must be used when the server redirects the user back to the redirect uri