Exemplo n.º 1
0
        public static NtToken GetLogonS4UToken(string user, string realm, SecurityLogonType logon_type)
        {
            switch (logon_type)
            {
            case SecurityLogonType.Batch:
            case SecurityLogonType.Interactive:
            case SecurityLogonType.Network:
                break;

            default:
                throw new ArgumentException("Invalid logon type for S4U");
            }

            return(LogonUtils.LogonS4U(user, realm, logon_type));
        }
Exemplo n.º 2
0
        public static NtToken GetLogonUserToken(string username, string domain, string password, SecurityLogonType logon_type)
        {
            switch (logon_type)
            {
            case SecurityLogonType.Batch:
            case SecurityLogonType.Interactive:
            case SecurityLogonType.Network:
            case SecurityLogonType.NetworkCleartext:
            case SecurityLogonType.NewCredentials:
            case SecurityLogonType.Service:
                break;

            default:
                throw new ArgumentException("Invalid logon type for Logon");
            }

            return(LogonUtils.Logon(username, domain, password, logon_type));
        }