blob: c8ba662ce65c5550dc53ead406e54664e21657d8 [file] [log] [blame]
// Copyright 2019 The Fuchsia Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
library fuchsia.auth.testing;
using fuchsia.auth;
/// This interface is intended as an additional interface implemented by an
/// AuthProvider. It allows a test component to inject persistent credentials
/// into the AuthProvider. This interface is intended as a short term solution
/// to enable end-to-end testing only and should not be generally used.
protocol LegacyAuthCredentialInjector {
/// Injects a persistent credential to the AuthProvider. This API should
/// only be called while there is an ongoing call to the AuthProvider's
/// GetPersistentCredential method. Calling this causes
/// GetPersistentCredential to return the supplied credential and
/// UserProfileInfo. It additionally stops the UI overlay started by
/// AuthProvider as part of the normal process for obtaining the credential.
///
/// |user_profile_info| should be information such as user id expected to
/// be returned by the external identity provider when authenticating.
/// |credential| should be a persistent credential provided by the external
/// identity provider called by the AuthProvider.
InjectPersistentCredential(fuchsia.auth.UserProfileInfo? user_profile_info,
string credential);
};