blob: ea5b340c115d1c5cea624326ba64ce67e808fdee [file] [log] [blame]
// Copyright (c) 2019, the Dart project authors. Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
import 'dart:async';
import '../command.dart';
import '../oauth2.dart' as oauth2;
/// Handles the `logout` pub command.
class LogoutCommand extends PubCommand {
@override
String get name => 'logout';
@override
String get description => 'Log out of pub.dartlang.org.';
@override
bool get takesArguments => false;
LogoutCommand();
@override
Future<void> runProtected() async {
oauth2.logout(cache);
}
}