@Override protected Principal doLogin(final Request request, final String username, final String password) throws ServletException { this.log.debug("logging in: {}", username); IWindowsIdentity windowsIdentity; try { windowsIdentity = this.auth.logonUser(username, password); } catch (final Exception e) { this.log.error(e.getMessage()); this.log.trace("", e); return super.doLogin(request, username, password); } // disable guest login if (!this.allowGuestLogin && windowsIdentity.isGuest()) { this.log.warn("guest login disabled: {}", windowsIdentity.getFqn()); return super.doLogin(request, username, password); } try { this.log.debug("successfully logged in {} ({})", username, windowsIdentity.getSidString()); final GenericWindowsPrincipal windowsPrincipal = new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString()); return windowsPrincipal; } finally { windowsIdentity.dispose(); } }
@Override protected Principal doLogin(final Request request, final String username, final String password) throws ServletException { this.log.debug("logging in: {}", username); IWindowsIdentity windowsIdentity; try { windowsIdentity = this.auth.logonUser(username, password); } catch (final Exception e) { this.log.error(e.getMessage()); this.log.trace("", e); return super.doLogin(request, username, password); } // disable guest login if (!this.allowGuestLogin && windowsIdentity.isGuest()) { this.log.warn("guest login disabled: {}", windowsIdentity.getFqn()); return super.doLogin(request, username, password); } try { this.log.debug("successfully logged in {} ({})", username, windowsIdentity.getSidString()); final GenericWindowsPrincipal windowsPrincipal = new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString()); return windowsPrincipal; } finally { windowsIdentity.dispose(); } }
this.context.getRealm(), this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.context.getRealm(), this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.context.getRealm(), this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.context.getRealm(), this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.context.getRealm(), this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.context.getRealm(), this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.context.getRealm(), this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.context.getRealm(), this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());
this.context.getRealm(), this.principalFormat, this.roleFormat); this.log.debug("roles: {}", windowsPrincipal.getRolesString());