Name

PassportIdentity

Synopsis

This class wraps information from the Passport user profile. For example, you can retrieve the 64-bit Passport User ID (PUID) from the Name property, along with information about how long the user has been signed in (TimeSinceSignIn), how old the current ticket is (TicketAge), and whether the password is currently saved on the user’s Passport login page (HasSavedPassword). Additionally, you can get information about any error associated with the current ticket (Error), although you must compare the number to values in the Passport documentation, as no enumeration is currently supplied. Other information from the Passport profile (including everything from the user’s birth date to the user’s language preference) is available through the Item key/value collection. For information on valid attribute names, consult the Passport documentation.

The PassportIdentity class also provides several methods, many of which are shared and available without a PassportIdentity instance (such as those used for encryption and compression). You can use LoginUser() to redirect a user to the Passport sign-in page, initiate a Passport-aware client authentication exchange. You can also use SignOut() to end the user’s session.

Note that you can pass -1 to any Passport method in place of an optional integer parameter. This indicates that Passport should use the default value from the registry and is equivalent to omitting optional parameters.

Public NotInheritable Class 

Get ASP.NET in a Nutshell now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.