blob: 04ffe1239226cf557a659bb87de61a5171238e62 [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.dev.';
@override
bool get takesArguments => false;
LogoutCommand();
@override
Future<void> runProtected() async {
oauth2.logout(cache);
}
}