ASP.NET Server Side API

TheIdentityHub.Account

Represents an account belonging to an identity.

Name Value Description
AccountId System.String Gets the account identifier
AccountPrivatePersonalIdentifier System.String The account private personal identifier
DisplayName System.String Gets the display name.
EmailAddress System.String Gets the email address.
PictureUrl System.String Gets the picture URL.

TheIdentityHub.AccountProvider

Represents an account provider.

Name Value Description
AccountProviderId System.String Gets the account provider identifier
Accounts TheIdentityHub.Account[] Gets the accounts.
DisplayName System.String Gets the display name.
ProviderImageUrl System.String Gets the provider image URL.

TheIdentityHub.Friend

Represents a friend.

Name Value Description
DisplayName System.String Gets the display name of the friend.
IdentityId System.String Gets the identifier of the friend.
LargePictures System.String[] Gets the large pictures of the friend.
MediumPictures System.String[] Gets the medium pictures of the friend.
SmallPicture System.String Gets the first small picture of the friend.
SmallPictures System.String[] Gets the small pictures of the friend.

TheIdentityHub.HubAuthenticationModule

Http modul to facilitates sign-in and sign-out

Name Description
SignOut Redirect the browser to link an account to the current identity.
CreateAuthenticateRedirectUrl(HttpRequestBase httpRequest, Uri replyUrl, string accountProviderId) Creates an URL to redirect and start the login flow.

TheIdentityHub.IdentityExtensions

Provides extension methods for principal objects to retrieve The Identity Hub provided claims.

Name Description
AccessToken Gets an OAuth 2.0 Access Token for the specified principal, that can be used to call The Identity Hub API to get more information about the identity.
DisplayName Gets the display name for the specified principal.
EmailAddress Gets the e-mail address of the specified principal.
EmailAddresses Gets the e-mail address of the specified principal.
IdentityId Gets the identity identifier for the specified principal.
LargePicture Gets the url of a large identity picture for the specified principal.
LargePictures Gets the url of the large identity pictures for the specified principal.
MediumPicture Gets the url of a medium identity picture for the specified principal.
MediumPictures Gets the url of the medium identity pictures for the specified principal.
Name Gets the unique identifier for the specified principal.
Roles Gets the roles for the specified principal.
SmallPicture Gets the url of a small identity picture for the specified principal.
SmallPictures Gets the url of a small identity pictures for the specified principal.

TheIdentityHub.IdentityHubError

Represents error information when a The Identity Hub API call fails.

Name Value Description Remarks
ErrorDetails TheIdentityHub.IdentityHubErrorDetail[] An array of TheIdentityHub.IdentityHubErrorDetail instances containing detailed error information.
Message String A general error message.

TheIdentityHub.IdentityHubErrorDetail

Represents detailed error information when a The Identity Hub API call fails.

Name Value Description Remarks
Id String Error identifier
Message String A detailed error message.
Name Description
ToString Returns a String that contains the detailed error information.

TheIdentityHub.IdentityHubException

Represents an exception thrown when a The Identity Hub API call fails.

Name Value Description Remarks
IdentityHubError TheIdentityHub.IdentityHubError A TheIdentityHub.IdentityHubError instance containing error information.

TheIdentityHub.IdentityService

Provides methods to query an identity's profile.

Name Description
IdentityService(string, Uri) Initializes a new instance of the TheIdentityHub.IdentityService class for the given client indentifier and base URL
IdentityService(string, Uri, string) Initializes a new instance of the TheIdentityHub.IdentityService class for the given client indentifier, base URL and Access Token
Name Value Description Remarks
AccessToken String The access token.
BaseUrl System.Uri Gets the base URL.
ClientId System.String Gets the client identifier.
Name Description
AddAccount Redirect the browser to link an account to the current identity.
DeleteProfileAsync Deletes the profile of the current identity.
GetAccountProvidersAsync Gets the account providers.
GetAccountProvidersAsync(long identityId) Gets the account providers of specified user.
GetFriendsAsync Gets the friends.
GetFriendsAsync(long identityId) Gets the friends of the specified user.
GetProfileAsync Gets the profile.
GetProfileAsync(long identityId) Gets the profile of the specified user.
GetRolesAsync Gets the roles.
GetRolesAsync(long identityId) Gets the roles of the specified user.
RequireTwoFactorAuthenticationAsync Indicates wether or not the user was authenticated using two-factor authentication. If not redirects the browser to let the current identity perform two-factor authentication.
UpdateProfileAsync Updates the profile.

TheIdentityHub.Profile

Represents an identity.

Name Value Description
Disabled System.Bool Gets a value indicating whether the identity has been disabled.
DisplayName System.String Gets the display name of the identity.
EmailAddress System.String Gets the email address of the identity.
EmailAddressVerified System.Bool Gets a value indicating whether the email address of the identity has been verified.
GivenName System.String Gets the name of the given of the identity.
IdentityId System.String Gets the identifier of the identity.
LargePictures System.String[] Gets the large pictures of the identity.
MediumPictures System.String[] Gets the medium pictures of the identity.
OldIdentityIds System.String[] Gets the identity id(s) of the identities that were merged
Picture System.Uri Gets the primary picture of the identity.
Properties System.Collections.Generic.Dictionary<string, string[]> Gets a dictionary of properties of the identity.
SmallPictures System.String[] Gets the small pictures of the identity.
Surname System.String Gets the surname of the identity.

TheIdentityHub.Role

Represents a role.

Name Value Description
Name System.String Gets the name of the role.