public function getAccessToken($refresh = false)
    {
        if ($this->_auth) {
            return $this->_auth->getToken($refresh)->access_token;
        } else {
            return null;
        }
    }
public function getAccessToken($refresh = false)
    {
        if ($this->_auth) {
            return $this->_auth->getToken($refresh)->access_token;
        } else {
            return null;
        }
    }
public function getAccessToken ( $ refresh = false ) { if ( $ this -> _auth ) { return $ this -> _auth -> getToken ( $ refresh ) -> access_token ; } else { return null ; } }
Gets an access token from the authentication client

@param bool $refresh whether to refresh the token
@return string the auth token
Gets an access token from the authentication client