docs.unity3d.com
  • Manual
  • Scripting API
  • Changelog
  • License

    • Unity.DigitalTwins.Identity
      • AuthenticationState
      • BrowserAuthenticatedAccessTokenProvider
      • CommandLineAccessTokenProvider
      • DeviceToken
      • HttpPkceRequestHandler
      • IActivatePlatformSupport
      • IAuthenticator
      • IInteractiveAuthenticator
      • IPkceConfigurationProvider
      • IPkcePlatformSupport
      • IPkceRequestHandler
      • IPreAuthenticatedAccessTokenProvider
      • IUserInfoProvider
      • LaunchArgumentsParser
      • LicenseInfo
      • LicenseType
      • OrganizationInfo
      • PersonalAccessTokenProvider
      • PkceAuthenticator
      • PkceConfiguration
      • PkceConfigurationProvider
      • PreAuthenticatedHostAccessTokenProvider
      • UserInfo
      • UserInfoProvider
    • Unity.DigitalTwins.Identity.Runtime
      • AndroidActivatePlatformSupport
      • AndroidPkcePlatformSupport
      • CompositeAuthenticator
      • EditorActivateFromUrl
      • EditorActivatePlatformSupport
      • EditorPkcePlatformSupport
      • IosActivatePlatformSupport
      • IosPkcePlatformSupport
      • LinuxActivatePlatformSupport
      • LinuxPkcePlatformSupport
      • OsxActivatePlatformSupport
      • OsxPkcePlatformSupport
      • PlatformSupportFactory
      • WebglActivatePlatformSupport
      • WebglPkcePlatformSupport
      • WindowsActivatePlatformSupport
      • WindowsPkcePlatformSupport

    Interface IAuthenticator

    An interface that provides calls to allow the user to login or logout. When logging in, the interface returns a token you can use to retrieve access to Digital Twin services.

    Inherited Members
    Unity.DigitalTwins.Common.IAccessTokenProvider.GetAccessTokenAsync()
    Namespace: Unity.DigitalTwins.Identity
    Assembly: solution.dll
    Syntax
    public interface IAuthenticator : IAccessTokenProvider

    Properties

    AuthenticationState

    Holds the current AuthenticationState.

    Declaration
    AuthenticationState AuthenticationState { get; }
    Property Value
    Type Description
    AuthenticationState

    Methods

    InitializeAsync()

    Initializes the IAuthenticator and its resulting AuthenticationState from the Interface implementation and initial configuration.

    Declaration
    Task InitializeAsync()
    Returns
    Type Description
    Task

    A Task.

    LoginAsync()

    Performs a login operation.

    Declaration
    Task LoginAsync()
    Returns
    Type Description
    Task

    A Task.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if IAuthenticator isn't properly initialized.

    Unity.DigitalTwins.Common.AuthenticationFailedException

    LogoutAsync()

    Performs a logout operation.

    Declaration
    Task LogoutAsync()
    Returns
    Type Description
    Task

    A Task.

    Exceptions
    Type Condition
    InvalidOperationException

    Thrown if IAuthenticator isn't properly initialized.

    Events

    AuthenticationStateChanged

    Triggers when the AuthenticationState of the current user changes.

    Declaration
    event Action<AuthenticationState> AuthenticationStateChanged
    Event Type
    Type Description
    Action<AuthenticationState>
    Remarks

    Subscribers of this event should restrict or allow access to available resources and features based on the returned value.

    Back to top Generated by DocFX
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023