blob: 91b4ae358b4b79ea668ac56a109669ae85e48eb9 [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.
type UserProfileInfo = struct {
/// 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.
id string;
/// 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.
display_name string:optional;
/// 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.
url string:optional;
/// 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.
image_url string:optional;
};
/// 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.
closed 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.
strict StartOverlay(resource struct {
view_holder_token fuchsia.ui.views.ViewHolderToken;
});
/// Requests base shell to stop displaying the auth view.
strict StopOverlay();
};