Beispiel #1
0
        protected override bool ExistsInValidatedAuthorityCache(string userPrincipalName)
        {
            if (string.IsNullOrEmpty(userPrincipalName))
            {
                throw new MsalException("UPN is required for ADFS authority validation.");
            }

            return(ValidatedAuthorities.ContainsKey(CanonicalAuthority) &&
                   ((AdfsAuthority)ValidatedAuthorities[CanonicalAuthority])._validForDomainsList.Contains(
                       GetDomainFromUpn(userPrincipalName)));
        }
Beispiel #2
0
        protected override void AddToValidatedAuthorities(string userPrincipalName)
        {
            AdfsAuthority authorityInstance = this;

            if (ValidatedAuthorities.ContainsKey(CanonicalAuthority))
            {
                authorityInstance = (AdfsAuthority)ValidatedAuthorities[CanonicalAuthority];
            }

            authorityInstance._validForDomainsList.Add(GetDomainFromUpn(userPrincipalName));
            ValidatedAuthorities[CanonicalAuthority] = authorityInstance;
        }
Beispiel #3
0
 protected override bool ExistsInValidatedAuthorityCache(string userPrincipalName)
 {
     return(ValidatedAuthorities.ContainsKey(CanonicalAuthority));
 }