コード例 #1
0
        public object Any(IsAuthenticated request)
        {
            var isAuthenticated = HttpContext.Current.User.Identity.IsAuthenticated;

            return(new IsAuthenticatedResponse
            {
                IsAuthenticated = isAuthenticated
            });
        }
コード例 #2
0
        public object Any(IsAuthenticated request)
        {
            var isAuthenticated = HttpContext.Current.User.Identity.IsAuthenticated;

            return new IsAuthenticatedResponse
            {
                IsAuthenticated = isAuthenticated
            };
        }
コード例 #3
0
        /// <inheritdoc />
        public override int GetHashCode()
        {
            unchecked
            {
                var hashCode = Name != null?Name.GetHashCode() : 0;

                hashCode = (hashCode * 397) ^ IsAuthenticated.GetHashCode();
                return(hashCode);
            }
        }
 /// <summary>
 /// Populates an <see cref="IDictionary{K,T}"/> with helpful diagnostic information.
 /// </summary>
 /// <param name="dict">Dictionary used to populate the <see cref="ManagedSecurityContextInformationProvider"></see></param>
 public void PopulateDictionary(IDictionary <string, object> dict)
 {
     dict.Add(Properties.Resources.ManagedSecurity_AuthenticationType, AuthenticationType);
     dict.Add(Properties.Resources.ManagedSecurity_IdentityName, IdentityName);
     dict.Add(Properties.Resources.ManagedSecurity_IsAuthenticated, IsAuthenticated.ToString());
 }
コード例 #5
0
 /// <summary>
 /// Populates an <see cref="IDictionary"/> with helpful diagnostic information.
 /// </summary>
 /// <param name="dict">Dictionary used to populate the <see cref="ManagedSecurityContextInformationProvider"></see></param>
 public void PopulateDictionary(IDictionary dict)
 {
     dict.Add(SR.ManagedSecurity_AuthenticationType, AuthenticationType);
     dict.Add(SR.ManagedSecurity_IdentityName, IdentityName);
     dict.Add(SR.ManagedSecurity_IsAuthenticated, IsAuthenticated.ToString());
 }