1 /** 2 * Waffle (https://github.com/dblock/waffle) 3 * 4 * Copyright (c) 2010 - 2015 Application Security, Inc. 5 * 6 * All rights reserved. This program and the accompanying materials 7 * are made available under the terms of the Eclipse Public License v1.0 8 * which accompanies this distribution, and is available at 9 * http://www.eclipse.org/legal/epl-v10.html 10 * 11 * Contributors: 12 * Application Security, Inc. 13 */ 14 package waffle.windows.auth; 15 16 /** 17 * A Windows Identity. 18 * 19 * @author dblock[at]dblock[dot]org 20 */ 21 public interface IWindowsIdentity { 22 23 /** 24 * Sid. 25 * 26 * @return String. 27 */ 28 String getSidString(); 29 30 /** 31 * Sid. 32 * 33 * @return Array of bytes. 34 */ 35 byte[] getSid(); 36 37 /** 38 * Fully qualified name. 39 * 40 * @return String. 41 */ 42 String getFqn(); 43 44 /** 45 * Group memberships. 46 * 47 * @return Array of accounts. 48 */ 49 IWindowsAccount[] getGroups(); 50 51 /** 52 * Impersonate a logged on user. 53 * 54 * @return An impersonation context. 55 */ 56 IWindowsImpersonationContext impersonate(); 57 58 /** 59 * Dispose of the Windows identity. 60 */ 61 void dispose(); 62 63 /** 64 * Returns true if the identity represents a Guest account. 65 * 66 * @return True if the identity represents a Guest account, false otherwise. 67 */ 68 boolean isGuest(); 69 }