src/Ubiquity/controllers/rest/RestServer.php
public function connect() {
		if (! isset ( $this->apiTokens )) {
			$this->apiTokens = $this->_loadApiTokens ();
		}
		$token = $this->apiTokens->addToken ();
		$this->_addHeaderToken ( $token );
		return [ "access_token" => $token,"token_type" => "Bearer","expires_in" => $this->apiTokens->getDuration () ];
	}
public function connect() {
		if (! isset ( $this->apiTokens )) {
			$this->apiTokens = $this->_loadApiTokens ();
		}
		$token = $this->apiTokens->addToken ();
		$this->_addHeaderToken ( $token );
		return [ "access_token" => $token,"token_type" => "Bearer","expires_in" => $this->apiTokens->getDuration () ];
	}
public function connect ( ) { if ( ! isset ( $ this -> apiTokens ) ) { $ this -> apiTokens = $ this -> _loadApiTokens ( ) ; } $ token = $ this -> apiTokens -> addToken ( ) ; $ this -> _addHeaderToken ( $ token ) ; return [ "access_token" => $ token , "token_type" => "Bearer" , "expires_in" => $ this -> apiTokens -> getDuration ( ) ] ; }
Establishes the connection with the server, returns an added token in the Authorization header of the request

@return array
Establishes the connection with the server returns an added token in the Authorization header of the request