All Downloads are FREE. Search and download functionalities are using the official Maven repository.

waffle.windows.auth.IWindowsIdentity Maven / Gradle / Ivy

There is a newer version: 1.8.1
Show newest version
/**
 * Waffle (https://github.com/dblock/waffle)
 *
 * Copyright (c) 2010 - 2015 Application Security, Inc.
 *
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Application Security, Inc.
 */
package waffle.windows.auth;

/**
 * A Windows Identity.
 * 
 * @author dblock[at]dblock[dot]org
 */
public interface IWindowsIdentity {

    /**
     * Sid.
     * 
     * @return String.
     */
    String getSidString();

    /**
     * Sid.
     * 
     * @return Array of bytes.
     */
    byte[] getSid();

    /**
     * Fully qualified name.
     * 
     * @return String.
     */
    String getFqn();

    /**
     * Group memberships.
     * 
     * @return Array of accounts.
     */
    IWindowsAccount[] getGroups();

    /**
     * Impersonate a logged on user.
     * 
     * @return An impersonation context.
     */
    IWindowsImpersonationContext impersonate();

    /**
     * Dispose of the Windows identity.
     */
    void dispose();

    /**
     * Returns true if the identity represents a Guest account.
     * 
     * @return True if the identity represents a Guest account, false otherwise.
     */
    boolean isGuest();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy