public function get_authorize_link(
        $response_type,
        $redirect_uri,
        $connection = null,
        $state = null,
        array $additional_params = []
    )
    {
        $additional_params['response_type'] = $response_type;
        $additional_params['redirect_uri']  = $redirect_uri;
        $additional_params['client_id']     = $this->client_id;

        if ($connection !== null) {
            $additional_params['connection'] = $connection;
        }

        if ($state !== null) {
            $additional_params['state'] = $state;
        }

        return sprintf(
            'https://%s/authorize?%s',
            $this->domain,
            Psr7\build_query($additional_params)
        );
    }
public function get_authorize_link(
        $response_type,
        $redirect_uri,
        $connection = null,
        $state = null,
        array $additional_params = []
    )
    {
        $additional_params['response_type'] = $response_type;
        $additional_params['redirect_uri']  = $redirect_uri;
        $additional_params['client_id']     = $this->client_id;

        if ($connection !== null) {
            $additional_params['connection'] = $connection;
        }

        if ($state !== null) {
            $additional_params['state'] = $state;
        }

        return sprintf(
            'https://%s/authorize?%s',
            $this->domain,
            Psr7\build_query($additional_params)
        );
    }
public function get_authorize_link ( $ response_type , $ redirect_uri , $ connection = null , $ state = null , array $ additional_params = [ ] ) { $ additional_params [ 'response_type' ] = $ response_type ; $ additional_params [ 'redirect_uri' ] = $ redirect_uri ; $ additional_params [ 'client_id' ] = $ this -> client_id ; if ( $ connection !== null ) { $ additional_params [ 'connection' ] = $ connection ; } if ( $ state !== null ) { $ additional_params [ 'state' ] = $ state ; } return sprintf ( 'https://%s/authorize?%s' , $ this -> domain , Psr7 \ build_query ( $ additional_params ) ) ; }
Builds and returns the authorization URL.

@param string      $response_type     Response type requested, typically "code" for web application login.
@param string      $redirect_uri      Redirect URI for login and consent, must be white-listed.
@param null|string $connection        Connection parameter to send with the request.
@param null|string $state             State parameter to send with the request.
@param array       $additional_params Additional URL parameters to send with the request.

@return string

@link https://auth0.com/docs/api/authentication#authorize-application
Builds and returns the authorization URL .