blob: 09f969eade04e68149b94b25f1d3be58338f2871 [file] [log] [blame]
// Copyright 2017 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;
using fuchsia.ui.views;
/// User attributes returned to callers on authorizing a new user at any auth
/// provider. These attributes are generated by calling the auth provider's
/// user profile apis.
struct UserProfileInfo {
/// User identifier returned by the backend identity provider server to
/// identify the user after successful authorization. Some identity providers
/// send verified email address as the identifier, and some send an opaque
/// string as the user identifier.
string id;
/// The name that is displayed on the base shell while logging in. Display
/// name is fetched from user profile attributes as configured by the user at
/// the given identity provider.
string? display_name;
/// User's profile url that is used by the base shell while logging in.
/// Profile url is fetched from user profile attributes as configured by the
/// user at the given identity provider.
string? url;
/// User's profile image url that is used by the base shell while logging in.
/// Profile image url is fetched from user profile attributes as configured by
/// the user at the given identity provider.
string? image_url;
};
/// This interface is implemented by base shell. It is used to notify the
/// base shell that a view for login needs to be started / stopped.
protocol AuthenticationUIContext {
/// Requests base shell to display `view_holder_token` for authentication.
/// Another call to StartOverlay() will not be made until StopOverlay()
/// has been called.
StartOverlay(fuchsia.ui.views.ViewHolderToken view_holder_token);
/// Requests base shell to stop displaying the auth view.
StopOverlay();
};