Examples of logonUser()


Examples of waffle.windows.auth.impl.WindowsAuthProviderImpl.logonUser()

    // TODO This was commented out, uncommented and ignore until I can determine if this is valid
    @Ignore
    @Test
    public void testLogonGuestUser() {
        IWindowsAuthProvider prov = new WindowsAuthProviderImpl();
        IWindowsIdentity identity = prov.logonUser("garbage", "garbage");
        LOGGER.debug("Fqn: {}", identity.getFqn());
        LOGGER.debug("Guest: {}", Boolean.valueOf(identity.isGuest()));
        assertTrue(identity.getFqn().endsWith("\\Guest"));
        assertTrue(identity.isGuest());
        identity.dispose();
View Full Code Here

Examples of waffle.windows.auth.impl.WindowsAuthProviderImpl.logonUser()

        userInfo.usri1_priv = LMAccess.USER_PRIV_USER;
        // ignore test if not able to add user (need to be administrator to do this).
        assumeTrue(LMErr.NERR_Success == Netapi32.INSTANCE.NetUserAdd(null, 1, userInfo, null));
        try {
            IWindowsAuthProvider prov = new WindowsAuthProviderImpl();
            IWindowsIdentity identity = prov.logonUser(userInfo.usri1_name.toString(),
                    userInfo.usri1_password.toString());
            assertTrue(identity.getFqn().endsWith("\\" + userInfo.usri1_name.toString()));
            assertFalse(identity.isGuest());
            identity.dispose();
        } finally {
View Full Code Here

Examples of waffle.windows.auth.impl.WindowsAuthProviderImpl.logonUser()

        userInfo.usri1_priv = LMAccess.USER_PRIV_USER;
        // ignore test if not able to add user (need to be administrator to do this).
        assumeTrue(LMErr.NERR_Success == Netapi32.INSTANCE.NetUserAdd(null, 1, userInfo, null));
        try {
            IWindowsAuthProvider prov = new WindowsAuthProviderImpl();
            IWindowsIdentity identity = prov.logonUser(userInfo.usri1_name.toString(),
                    userInfo.usri1_password.toString());
            IWindowsImpersonationContext ctx = identity.impersonate();
            assertTrue(userInfo.usri1_name.toString().equals(Advapi32Util.getUserName()));
            ctx.revertToSelf();
            assertFalse(userInfo.usri1_name.toString().equals(Advapi32Util.getUserName()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.