securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
} catch (Win32Exception e) { log.debug("Authentication failed for '{}' against '{}'", username, getRealmName()); log.error(e.getMessage()); } finally { if (identity != null) {
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
@Override public Authentication authenticate(final Authentication authentication) { final UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication; IWindowsIdentity windowsIdentity; try { windowsIdentity = this.authProvider.logonUser(auth.getName(), auth.getCredentials().toString()); } catch (final Win32Exception e) { throw new AuthenticationServiceException(e.getMessage(), e); } WindowsAuthenticationProvider.LOGGER.debug("logged in user: {} ({})", windowsIdentity.getFqn(), windowsIdentity.getSidString()); if (!this.allowGuestLogin && windowsIdentity.isGuest()) { WindowsAuthenticationProvider.LOGGER.warn("guest login disabled: {}", windowsIdentity.getFqn()); throw new GuestLoginDisabledAuthenticationException(windowsIdentity.getFqn()); } final WindowsPrincipal windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); WindowsAuthenticationProvider.LOGGER.debug("roles: {}", windowsPrincipal.getRolesString()); final WindowsAuthenticationToken token = new WindowsAuthenticationToken(windowsPrincipal, this.grantedAuthorityFactory, this.defaultGrantedAuthority); WindowsAuthenticationProvider.LOGGER.info("successfully logged in user: {}", windowsIdentity.getFqn()); return token; }
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
@Override public Authentication authenticate(final Authentication authentication) { final UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication; IWindowsIdentity windowsIdentity; try { windowsIdentity = this.authProvider.logonUser(auth.getName(), auth.getCredentials().toString()); } catch (final Win32Exception e) { throw new AuthenticationServiceException(e.getMessage(), e); } WindowsAuthenticationProvider.LOGGER.debug("logged in user: {} ({})", windowsIdentity.getFqn(), windowsIdentity.getSidString()); if (!this.allowGuestLogin && windowsIdentity.isGuest()) { WindowsAuthenticationProvider.LOGGER.warn("guest login disabled: {}", windowsIdentity.getFqn()); throw new GuestLoginDisabledAuthenticationException(windowsIdentity.getFqn()); } final WindowsPrincipal windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); WindowsAuthenticationProvider.LOGGER.debug("roles: {}", windowsPrincipal.getRolesString()); final WindowsAuthenticationToken token = new WindowsAuthenticationToken(windowsPrincipal, this.grantedAuthorityFactory, this.defaultGrantedAuthority); WindowsAuthenticationProvider.LOGGER.info("successfully logged in user: {}", windowsIdentity.getFqn()); return token; }
@Override public Authentication authenticate(final Authentication authentication) { final UsernamePasswordAuthenticationToken auth = (UsernamePasswordAuthenticationToken) authentication; IWindowsIdentity windowsIdentity; try { windowsIdentity = this.authProvider.logonUser(auth.getName(), auth.getCredentials().toString()); } catch (final Win32Exception e) { throw new AuthenticationServiceException(e.getMessage(), e); } WindowsAuthenticationProvider.LOGGER.debug("logged in user: {} ({})", windowsIdentity.getFqn(), windowsIdentity.getSidString()); if (!this.allowGuestLogin && windowsIdentity.isGuest()) { WindowsAuthenticationProvider.LOGGER.warn("guest login disabled: {}", windowsIdentity.getFqn()); throw new GuestLoginDisabledAuthenticationException(windowsIdentity.getFqn()); } final WindowsPrincipal windowsPrincipal = new WindowsPrincipal(windowsIdentity, this.principalFormat, this.roleFormat); WindowsAuthenticationProvider.LOGGER.debug("roles: {}", windowsPrincipal.getRolesString()); final WindowsAuthenticationToken token = new WindowsAuthenticationToken(windowsPrincipal, this.grantedAuthorityFactory, this.defaultGrantedAuthority); WindowsAuthenticationProvider.LOGGER.info("successfully logged in user: {}", windowsIdentity.getFqn()); return token; }
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("{}", e); sendUnauthorized(response);
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);
securityContext = this.auth.acceptSecurityToken(connectionId, tokenBuffer, securityPackage); } catch (final Win32Exception e) { this.log.warn("error logging in user: {}", e.getMessage()); this.log.trace("", e); this.sendUnauthorized(response);