public static Account Create(
     string homeAccountId,
     string environment,
     string realm,
     string localAccountId,
     CacheV2AuthorityType authorityType,
     string userName,
     string givenName,
     string familyName,
     string middleName,
     string name,
     string alternativeAccountId,
     string clientInfo,
     string additionalFieldsJson)
 {
     return(new Account
     {
         HomeAccountId = homeAccountId,
         Environment = environment,
         Realm = realm,
         LocalAccountId = localAccountId,
         AuthorityType = authorityType,
         Username = userName,
         GivenName = givenName,
         FamilyName = familyName,
         MiddleName = middleName,
         Name = name,
         AlternativeAccountId = alternativeAccountId,
         ClientInfo = clientInfo,
         AdditionalFieldsJson = additionalFieldsJson
     });
 }
예제 #2
0
        private static string AuthorityTypeToString(CacheV2AuthorityType authorityType)
        {
            switch (authorityType)
            {
            case CacheV2AuthorityType.MsSts:
                return(StorageJsonValues.AuthorityTypeMsSts);

            case CacheV2AuthorityType.Adfs:
                return(StorageJsonValues.AuthorityTypeAdfs);

            case CacheV2AuthorityType.Msa:
                return(StorageJsonValues.AuthorityTypeMsa);

            default:
                return(StorageJsonValues.AuthorityTypeOther);
            }
        }