From 5ad3449648b5268c4f5300b77e71fd9119067779 Mon Sep 17 00:00:00 2001 From: AdvancedREI Date: Thu, 22 May 2014 10:44:17 -0700 Subject: [PATCH] Auth0: Other UserProfile definitions, etc. Also includes a couple browser window extensions necessary for interacting with the API. --- auth0/auth0.d.ts | 28 +++++++++++++++++++++++++++- 1 file changed, 27 insertions(+), 1 deletion(-) diff --git a/auth0/auth0.d.ts b/auth0/auth0.d.ts index e4b114b6f..02b8e0196 100644 --- a/auth0/auth0.d.ts +++ b/auth0/auth0.d.ts @@ -3,6 +3,16 @@ // Definitions by: Robert McLaws // Definitions: https://github.com/borisyankov/DefinitelyTyped +/** Extensions to the browser Window object. */ +interface Window { + /** Allows you to pass the id_token to other APIs, as specified in https://docs.auth0.com/apps-apis */ + token: string; +} + +interface Location { + origin: string; +} + /** This is the interface for the main Auth0 client. */ interface Auth0Static { @@ -47,7 +57,23 @@ interface Auth0UserProfile { identities: Auth0Identity[]; } -/** Represents */ +/** Represents an Auth0UserProfile that has a Microsoft Account as the primary identity. */ +interface MicrosoftUserProfile extends Auth0UserProfile { + emails: string[]; +} + +/** Represents an Auth0UserProfile that has an Office365 account as the primary identity. */ +interface Office365UserProfile extends Auth0UserProfile { + tenantid: string; + upn: string; +} + +/** Represents an Auth0UserProfile that has an Active Directory account as the primary identity. */ +interface AdfsUserProfile extends Auth0UserProfile { + issuer: string; +} + +/** Represents multiple identities assigned to a user. */ interface Auth0Identity { access_token: string; connection: string;