/** * This method will create an instance of a IWindowsIdentity based GenericPrincipal. It is used for creating custom * implementation within subclasses. * * @param windowsIdentity * the windows identity to initialize the principal * @return the Generic Principal */ protected GenericPrincipal createPrincipal(final IWindowsIdentity windowsIdentity) { return new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); }
/** * This method will create an instance of a IWindowsIdentity based GenericPrincipal. It is used for creating custom * implementation within subclasses. * * @param windowsIdentity * the windows identity to initialize the principal * @return the Generic Principal */ protected GenericPrincipal createPrincipal(final IWindowsIdentity windowsIdentity) { return new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); }
/** * This method will create an instance of a IWindowsIdentity based GenericPrincipal. It is used for creating custom * implementation within subclasses. * * @param windowsIdentity * the windows identity to initialize the principal * @return the Generic Principal */ protected GenericPrincipal createPrincipal(final IWindowsIdentity windowsIdentity) { return new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); }
/** * This method will create an instance of a IWindowsIdentity based GenericPrincipal. It is used for creating custom * implementation within subclasses. * * @param windowsIdentity * the windows identity to initialize the principal * @return the Generic Principal */ protected GenericPrincipal createPrincipal(final IWindowsIdentity windowsIdentity) { return new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); }
/** * This method will create an instance of a IWindowsIdentity based GenericPrincipal. It is used for creating custom * implementation within subclasses. * * @param windowsIdentity * the windows identity to initialize the principal * @return the Generic Principal */ protected GenericPrincipal createPrincipal(final IWindowsIdentity windowsIdentity) { return new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); }
/** * This method will create an instance of a IWindowsIdentity based GenericPrincipal. It is used for creating custom * implementation within subclasses. * * @param windowsIdentity * the windows identity to initialize the principal * @return the Generic Principal */ protected GenericPrincipal createPrincipal(final IWindowsIdentity windowsIdentity) { return new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); }
/** * This method will create an instance of a IWindowsIdentity based GenericPrincipal. It is used for creating custom * implementation within subclasses. * * @param windowsIdentity * the windows identity to initialize the principal * @return the Generic Principal */ protected GenericPrincipal createPrincipal(final IWindowsIdentity windowsIdentity) { return new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); }
/** * This method will create an instance of a IWindowsIdentity based GenericPrincipal. It is used for creating custom * implementation within subclasses. * * @param windowsIdentity * the windows identity to initialize the principal * @return the Generic Principal */ protected GenericPrincipal createPrincipal(final IWindowsIdentity windowsIdentity) { return new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); }
@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.log.debug("successfully logged in {} ({})", username, windowsIdentity.getSidString()); final GenericWindowsPrincipal windowsPrincipal = new GenericWindowsPrincipal(windowsIdentity, this.context.getRealm(), this.principalFormat, this.roleFormat);
this.log.debug("successfully logged in {} ({})", username, windowsIdentity.getSidString()); final GenericWindowsPrincipal windowsPrincipal = new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat);
this.log.debug("successfully logged in {} ({})", username, windowsIdentity.getSidString()); final GenericWindowsPrincipal windowsPrincipal = new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat);
this.log.debug("successfully logged in {} ({})", username, windowsIdentity.getSidString()); final GenericWindowsPrincipal windowsPrincipal = new GenericWindowsPrincipal(windowsIdentity, this.context.getRealm(), this.principalFormat, this.roleFormat);
this.log.debug("successfully logged in {} ({})", username, windowsIdentity.getSidString()); final GenericWindowsPrincipal windowsPrincipal = new GenericWindowsPrincipal(windowsIdentity, this.context.getRealm(), this.principalFormat, this.roleFormat);
final GenericWindowsPrincipal windowsPrincipal = new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat);
final GenericWindowsPrincipal windowsPrincipal = new GenericWindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat);
final GenericWindowsPrincipal windowsPrincipal = new GenericWindowsPrincipal(windowsIdentity, this.context.getRealm(), this.principalFormat, this.roleFormat);
this.log.debug("successfully logged in {} ({})", windowsIdentity.getFqn(), windowsIdentity.getSidString()); final GenericWindowsPrincipal windowsPrincipal = new GenericWindowsPrincipal(windowsIdentity, this.context.getRealm(), this.principalFormat, this.roleFormat);
final GenericWindowsPrincipal windowsPrincipal = new GenericWindowsPrincipal(windowsIdentity, this.context.getRealm(), this.principalFormat, this.roleFormat);