UserIdentity Class

Enthält die ID, Tickets und andere Informationen, die einem Benutzer zugeordnet sind..

Syntax


Public NotInheritable Class UserIdentity

Attribute

[MarshalingBehavior(Agile)]
[Version(0x06020000)]

Member

Der UserIdentityKlasse hat die folgenden Arten von Membern:

Methoden

The UserIdentity Klasse erbt außerdem Methoden von Object Klasse (C#/VB/C++).

Eigenschaften

UserIdentityKlasse hat die folgenden Eigenschaften.

EigenschaftZugriffstypBeschreibung

FirstName

SchreibgeschütztContains the first name of the user. This value is available only to Microsoft application partners.

Id

SchreibgeschütztGets the user's unique Microsoft account identifier. This value is available only to Microsoft application partners.

IsBetaAccount

SchreibgeschütztIndicates if the user is part of a beta program. This value is available only to Microsoft application partners.

IsConfirmedPC

SchreibgeschütztIndicates if the user is on a PC that they have confirmed as their PC. This value is available only to Microsoft application partners.

LastName

SchreibgeschütztContains the user's last name. This value is available only to Microsoft application partners.

SafeCustomerId

SchreibgeschütztGets an obfuscated customer ID specific to the calling application.

SignInName

SchreibgeschütztThe sign in name of the user. This value is available only to Microsoft application partners.

Tickets

SchreibgeschütztContains an array of tickets that identify the user

 

Beispiele


List<OnlineIdServiceTicketRequest> targetArray = new List<OnlineIdServiceTicketRequest>();
targetArray.Add(new OnlineIdServiceTicketRequest("wl.basic wl.contacts_photos wl.calendars",
        "DELEGATION"));

DebugPrint("Signing in ...");

Windows.Security.Authentication.OnlineId.UserIdentity result = 
        await _authenticator.AuthenticateUserAsync(targetArray, CredentialPromptType.PromptIfNeeded);

if (result.Tickets[0].Value != string.Empty)
{
    DebugPrint("Signed in.");
    IsNotSignedIn = false;
}
else
{
    // Handle errors like bad parameter, misconfigured target, and so on.
    DebugPrint("Unable to get the ticket. Error: " + result.Tickets[0].ErrorCode.ToString());
    IsNotSignedIn = true;
}

Anforderungen

Unterstützte Mindestversion (Client)

Windows 8 [Nur Windows Store-Apps]

Unterstützte Mindestversion (Server)

Windows Server 2012 [Nur Windows Store-Apps]

Unterstützte Mindestversion (Telefon)

Windows Phone 8

Namespace

Windows.Security.Authentication.OnlineId
Windows::Security::Authentication::OnlineId [C++]

Metadaten

Windows.winmd

 

 

Anzeigen:
© 2014 Microsoft