public function login($state = null, $connection = null, array $additionalParams = [])
    {
        $params = [];
        if ($this->audience) {
            $params['audience'] = $this->audience;
        }

        if ($this->scope) {
            $params['scope'] = $this->scope;
        }

        if ($state === null) {
            $state = $this->stateHandler->issue();
        } else {
            $this->stateHandler->store($state);
        }

        $params['response_mode'] = $this->responseMode;

        if (! empty($additionalParams) && is_array($additionalParams)) {
            $params = array_replace($params, $additionalParams);
        }

        $url = $this->authentication->get_authorize_link(
            $this->responseType,
            $this->redirectUri,
            $connection,
            $state,
            $params
        );

        header('Location: '.$url);
        exit;
    }
public function login($state = null, $connection = null, array $additionalParams = [])
    {
        $params = [];
        if ($this->audience) {
            $params['audience'] = $this->audience;
        }

        if ($this->scope) {
            $params['scope'] = $this->scope;
        }

        if ($state === null) {
            $state = $this->stateHandler->issue();
        } else {
            $this->stateHandler->store($state);
        }

        $params['response_mode'] = $this->responseMode;

        if (! empty($additionalParams) && is_array($additionalParams)) {
            $params = array_replace($params, $additionalParams);
        }

        $url = $this->authentication->get_authorize_link(
            $this->responseType,
            $this->redirectUri,
            $connection,
            $state,
            $params
        );

        header('Location: '.$url);
        exit;
    }
public function login ( $ state = null , $ connection = null , array $ additionalParams = [ ] ) { $ params = [ ] ; if ( $ this -> audience ) { $ params [ 'audience' ] = $ this -> audience ; } if ( $ this -> scope ) { $ params [ 'scope' ] = $ this -> scope ; } if ( $ state === null ) { $ state = $ this -> stateHandler -> issue ( ) ; } else { $ this -> stateHandler -> store ( $ state ) ; } $ params [ 'response_mode' ] = $ this -> responseMode ; if ( ! empty ( $ additionalParams ) && is_array ( $ additionalParams ) ) { $ params = array_replace ( $ params , $ additionalParams ) ; } $ url = $ this -> authentication -> get_authorize_link ( $ this -> responseType , $ this -> redirectUri , $ connection , $ state , $ params ) ; header ( 'Location: ' . $ url ) ; exit ; }
Redirect to the hosted login page for a specific client

@param null  $state            - state value.
@param null  $connection       - connection to use.
@param array $additionalParams - additional, valid parameters.

@return void

@see \Auth0\SDK\API\Authentication::get_authorize_link()
@see https://auth0.com/docs/api/authentication#login
Redirect to the hosted login page for a specific client