import { LitElement, PropertyValues } from 'lit'; import * as Msal from '@azure/msal-browser'; import { PublicClientApplication } from '@azure/msal-browser'; import '../button/arc-button.js'; import '../avatar/arc-avatar.js'; import '../dropdown/arc-dropdown.js'; import '../menu/arc-menu.js'; import '../menu-item/arc-menu-item.js'; /** * @slot login - Used to overwrite the default login slot. * @slot logout - Used to overwrite the default logout slot. * * @event arc-auth - Emitted when the internal authentication state of the component changes. * * @ssr - True */ export default class ArcSSO extends LitElement { /** @internal */ static tag: string; static styles: import("lit").CSSResult[]; /** @internal openid - By using this permission, an app can receive a unique identifier for the user in the form of the sub claim. The permission also gives the app access to the UserInfo endpoint. The `openid` scope can be used at the Microsoft identity platform token endpoint to acquire ID tokens. The app can use these tokens for authentication. profile - The `profile` scope can be used with the openid scope and any other scope. It gives the app access to a large amount of information about the user. The information it can access includes, but isn't limited to, the user's given name, surname, preferred username, and object ID. User.Read - The User.Read permission gives access to the sub claim. It allows the client or app to correctly identify the user over time and access rudimentary user information. */ private loginRequest; /** @internal - Reference to the MSAL instance. */ msalInstance: PublicClientApplication; /** @internal - State that keeps track of the auth status of the user. */ private _isAuth; /** @internal - State that keeps track of the user avatar. */ private _avatar; /** @internal - Keeps track of the callback ID. Not state to prevent infinite loops */ private _callbackId; /** The id of the application. This value can be found on the Azure AD portal. */ clientId: string; /** Identifies which Azure AD instance the application sits under. The default `common` value is used for multi-tenant applications and applications allowing personal accounts (not B2C). If your application audience is single-tenant, you must provide this property. This value can be found on the Azure AD portal. */ tenantId: string; /** The location where the authorization server sends the user once the app has been successfully authorized and granted an authorization code or access token. This url needs to be specified in the component and within the Authentication tab on the Azure AD portal. */ redirectUri: string; /** A comma separated string that allows for additional permissions on how your app must interact with the Microsoft identity platform. More about this can be found on https://docs.microsoft.com/en-us/azure/active-directory/develop/v2-permissions-and-consent. */ scopes: string; handleAuthChange(): Promise; connectedCallback(): void; private _handleAuthChange; protected updated(changedProperties: PropertyValues): void; private _initMsal; private _getAccessToken; signIn(): void; signOut(): void; getAccount(): Msal.AccountInfo | undefined; getAvatar(): Promise; protected render(): import("lit-html").TemplateResult<1>; } declare global { interface HTMLElementTagNameMap { 'arc-sso': ArcSSO; } }