/** * Instantiates a new negotiate authentication realm. */ public NegotiateAuthenticationRealm() { this.windowsAuthProvider = new WindowsAuthProviderImpl(); }
/** * The {@link WindowsAuthProviderImpl} instance. * * @return the windows auth provider impl */ @Bean @ConditionalOnMissingBean public WindowsAuthProviderImpl waffleWindowsAuthProvider() { return new WindowsAuthProviderImpl(); }
/** * Hook to the start and to set up the dependencies. * * @throws LifecycleException * the lifecycle exception */ @Override public void startInternal() throws LifecycleException { this.log.debug("Creating a windows authentication provider with continueContextsTimeout property set to: {}", this.continueContextsTimeout); this.auth = new WindowsAuthProviderImpl(this.continueContextsTimeout); super.startInternal(); }
/** * Hook to the start and to set up the dependencies. * * @throws LifecycleException * the lifecycle exception */ @Override public void startInternal() throws LifecycleException { this.log.debug("Creating a windows authentication provider with continueContextsTimeout property set to: {}", this.continueContextsTimeout); this.auth = new WindowsAuthProviderImpl(this.continueContextsTimeout); super.startInternal(); }
/** * Hook to the start and to set up the dependencies. * * @throws LifecycleException * the lifecycle exception */ @Override protected synchronized void startInternal() throws LifecycleException { this.log.debug("Creating a windows authentication provider with continueContextsTimeout property set to: {}", this.continueContextsTimeout); this.auth = new WindowsAuthProviderImpl(this.continueContextsTimeout); super.startInternal(); }
/** * Hook to the start and to set up the dependencies. * * @throws LifecycleException * the lifecycle exception */ @Override public void startInternal() throws LifecycleException { this.log.debug("Creating a windows authentication provider with continueContextsTimeout property set to: {}", this.continueContextsTimeout); this.auth = new WindowsAuthProviderImpl(this.continueContextsTimeout); super.startInternal(); }
/** * Hook to the start and to set up the dependencies. * * @throws LifecycleException * the lifecycle exception */ @Override protected synchronized void startInternal() throws LifecycleException { this.log.debug("Creating a windows authentication provider with continueContextsTimeout property set to: {}", this.continueContextsTimeout); this.auth = new WindowsAuthProviderImpl(this.continueContextsTimeout); super.startInternal(); }
/** * Hook to the start and to set up the dependencies. * * @throws LifecycleException * the lifecycle exception */ @Override protected synchronized void startInternal() throws LifecycleException { this.log.debug("Creating a windows authentication provider with continueContextsTimeout property set to: {}", this.continueContextsTimeout); this.auth = new WindowsAuthProviderImpl(this.continueContextsTimeout); super.startInternal(); }
/** * Hook to the start and to set up the dependencies. * * @throws LifecycleException * the lifecycle exception */ @Override public void startInternal() throws LifecycleException { this.log.debug("Creating a windows authentication provider with continueContextsTimeout property set to: {}", this.continueContextsTimeout); this.auth = new WindowsAuthProviderImpl(this.continueContextsTimeout); super.startInternal(); }
/** * Hook to the start and to set up the dependencies. * * @throws LifecycleException * the lifecycle exception */ @Override protected synchronized void startInternal() throws LifecycleException { this.log.debug("Creating a windows authentication provider with continueContextsTimeout property set to: {}", this.continueContextsTimeout); this.auth = new WindowsAuthProviderImpl(this.continueContextsTimeout); super.startInternal(); }
@Override public void setup(Config config) { super.setup(config); String os = System.getProperty("os.name").toLowerCase(); Preconditions.checkState(os.startsWith("windows"), "Windows authentication is not supported on '{0}'", os); if (config.hasPath("defaultDomain")) { defaultDomain = Strings.emptyToNull(config.getString("defaultDomain")); } if (config.hasPath("allowGuests")) { allowGuests = config.getBoolean("allowGuests"); } adminGroups = Arrays.asList("BUILTIN\\Administrators"); if (config.hasPath("adminGroups")) { adminGroups = config.getStringList("adminGroups"); } waffle = new WindowsAuthProviderImpl(); }
public boolean isValidUser(String username , String password){ WindowsAuthProviderImpl authenticationProvider = new WindowsAuthProviderImpl(); IWindowsIdentity loggedOnUser = authenticationProvider.logonUser(username, password); if(!loggedOnUser.isGuest()){ return true; } return false; }
/** * Gets the lookup info. * * @param doc * the doc * @param lookup * the lookup * @return the lookup info */ public Element getLookupInfo(final Document doc, final String lookup) { final IWindowsAuthProvider auth = new WindowsAuthProviderImpl(); final Element node = doc.createElement("lookup"); node.setAttribute("name", lookup); try { this.addAccountInfo(doc, node, auth.lookupAccount(lookup)); } catch (final Win32Exception e) { node.appendChild(WaffleInfo.getException(doc, e)); } return node; }
/** * Gets the lookup info. * * @param doc * the doc * @param lookup * the lookup * @return the lookup info */ public Element getLookupInfo(final Document doc, final String lookup) { final IWindowsAuthProvider auth = new WindowsAuthProviderImpl(); final Element node = doc.createElement("lookup"); node.setAttribute("name", lookup); try { this.addAccountInfo(doc, node, auth.lookupAccount(lookup)); } catch (final Win32Exception e) { node.appendChild(WaffleInfo.getException(doc, e)); } return node; }
/** * Gets the lookup info. * * @param doc * the doc * @param lookup * the lookup * @return the lookup info */ public Element getLookupInfo(final Document doc, final String lookup) { final IWindowsAuthProvider auth = new WindowsAuthProviderImpl(); final Element node = doc.createElement("lookup"); node.setAttribute("name", lookup); try { this.addAccountInfo(doc, node, auth.lookupAccount(lookup)); } catch (final Win32Exception ex) { node.appendChild(WaffleInfo.getException(doc, ex)); } return node; }
IWindowsAuthProvider prov = new WindowsAuthProviderImpl(); IWindowsIdentity identity = prov.logonUser("username", "password"); System.out.println("User identity: " + identity.getFqn()); for(IWindowsAccount group : identity.getGroups()) { System.out.println(" " + group.getFqn() + " (" + group.getSidString() + ")"); }
final IWindowsAuthProvider auth = new WindowsAuthProviderImpl();
final IWindowsAuthProvider auth = new WindowsAuthProviderImpl();
WindowsAuthProviderImpl provider = new WindowsAuthProviderImpl(); IWindowsSecurityContext serverContext = null;