Added support for authentication codes for the VM service. (#30857)
* Added support for authentication codes for the VM service. Previously, a valid web socket connection would use the following URI: `ws://127.0.0.1/ws` Now, by default, the VM service requires a connection to be made with a URI similar to the following: `ws://127.0.0.1:8181/Ug_U0QVsqFs=/ws` where `Ug_U0QVsqFs` is an authentication code generated and shared by the service. This behavior can be disabled with the `--disable-service-auth-codes` flag.
This commit is contained in:
@@ -26,7 +26,7 @@ void main() {
|
||||
print('run: starting...');
|
||||
final Process run = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
<String>['run', '--verbose', '-d', device.deviceId, 'lib/commands.dart'],
|
||||
<String>['run', '--verbose', '--disable-service-auth-codes', '-d', device.deviceId, 'lib/commands.dart'],
|
||||
);
|
||||
final StreamController<String> stdout = StreamController<String>.broadcast();
|
||||
run.stdout
|
||||
|
||||
@@ -21,7 +21,8 @@ void main() {
|
||||
section('Compile and run the tester app');
|
||||
Completer<void> firstNameFound = Completer<void>();
|
||||
Completer<void> secondNameFound = Completer<void>();
|
||||
final Process runProcess = await _run(device: device, command: <String>['run'], stdoutListener: (String line) {
|
||||
final Process runProcess = await _run(device: device, command:
|
||||
<String>['run', '--disable-service-auth-codes'], stdoutListener: (String line) {
|
||||
if (line.contains(_kFirstIsolateName)) {
|
||||
firstNameFound.complete();
|
||||
} else if (line.contains(_kSecondIsolateName)) {
|
||||
|
||||
@@ -34,7 +34,7 @@ void main() {
|
||||
print('run: starting...');
|
||||
final Process run = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
<String>['run', '--verbose', '-d', device.deviceId, '--route', '/smuggle-it', 'lib/route.dart'],
|
||||
<String>['run', '--verbose', '--disable-service-auth-codes', '-d', device.deviceId, '--route', '/smuggle-it', 'lib/route.dart'],
|
||||
);
|
||||
run.stdout
|
||||
.transform<String>(utf8.decoder)
|
||||
|
||||
@@ -26,7 +26,7 @@ void main() {
|
||||
print('run: starting...');
|
||||
final Process run = await startProcess(
|
||||
path.join(flutterDirectory.path, 'bin', 'flutter'),
|
||||
<String>['run', '--verbose', '-d', device.deviceId, 'lib/main.dart'],
|
||||
<String>['run', '--verbose', '--disable-service-auth-codes', '-d', device.deviceId, 'lib/main.dart'],
|
||||
);
|
||||
run.stdout
|
||||
.transform<String>(utf8.decoder)
|
||||
|
||||
Reference in New Issue
Block a user