token_service.h revision c407dc5cd9bdc5668497f21b26b09d988ab439de
1// Copyright (c) 2010 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4//
5// The TokenService will supply authentication tokens for any service that
6// needs it. One such service is Sync.
7// For the time being, the Token Service just supplies the LSID from the
8// ChromiumOS login. In the future, it'll have a bit more logic and supply
9// only AuthTokens from Gaia, and not LSIDs.
10
11#ifndef CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_H_
12#define CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_H_
13
14#include "chrome/common/net/gaia/gaia_auth_consumer.h"
15
16class TokenService {
17 public:
18  void SetClientLoginResult(
19    const GaiaAuthConsumer::ClientLoginResult& credentials);
20
21  bool HasLsid();
22  const std::string& GetLsid();
23
24  // TODO(chron): Token broadcast will require removing a lot of auth code
25  //              from sync. For the time being we'll start with LSID passing.
26
27 private:
28  GaiaAuthConsumer::ClientLoginResult credentials_;
29};
30
31#endif  // CHROME_BROWSER_NET_GAIA_TOKEN_SERVICE_H_
32