internal UserInfo(UserInfo other)
 {
     this.UniqueId = other.UniqueId;
     this.DisplayableId = other.DisplayableId;
     this.GivenName = other.GivenName;
     this.FamilyName = other.FamilyName;
     this.IdentityProvider = other.IdentityProvider;
     this.PasswordChangeUrl = other.PasswordChangeUrl;
     this.PasswordExpiresOn = other.PasswordExpiresOn;
 }
 internal void UpdateTenantAndUserInfo(string tenantId, string idToken, UserInfo userInfo)
 {
     this.TenantId = tenantId;
     this.IdToken = idToken;
     if (userInfo != null)
     {
         this.UserInfo = new UserInfo(userInfo);
     }
 }
 internal void UpdateTenantAndUserInfo(string tenantId, string profileInfo, UserInfo userInfo)
 {
     this.TenantId = tenantId;
     this.ProfileInfo = profileInfo;
     if (userInfo != null)
     {
         this.UserInfo = new UserInfo(userInfo);
     }
 }
 internal TokenCacheKey(string authority, string resource, string clientId, TokenSubjectType tokenSubjectType, UserInfo userInfo)
     : this(authority, resource, clientId, tokenSubjectType, (userInfo != null) ? userInfo.UniqueId : null, (userInfo != null) ? userInfo.DisplayableId : null)
 {
 }
 public UserIdentity(UserInfo userInfo)
 {
     UserName = userInfo.UserId;
     // ignore Claims for now -- haven't received any help from the Nancy boys on how this should be used
     // to map claims provided via ADAL
 }