示例#1
0
        public void Authenticate(string userPrincipalName)
        {
            TokenIdentity tokenIdentity = new TokenIdentity()
            {
                IsAuthenticated = true,
                Name            = userPrincipalName
            };

            Identity          = tokenIdentity;
            UserPrincipalName = userPrincipalName;
        }
示例#2
0
        public TokenPrincipal()
        {
            TokenIdentity tokenIdentity = new TokenIdentity()
            {
                AuthenticationType = "ActiveDirectory",
                IsAuthenticated    = false,
                Name = "Anonymous"
            };

            Identity = tokenIdentity;
        }