本文整理了Java中org.apache.catalina.authenticator.AuthenticatorBase.doLogin()
方法的一些代码示例,展示了AuthenticatorBase.doLogin()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。AuthenticatorBase.doLogin()
方法的具体详情如下:
包路径:org.apache.catalina.authenticator.AuthenticatorBase
类名称:AuthenticatorBase
方法名:doLogin
[英]Process the login request.
[中]处理登录请求。
代码示例来源:origin: org.apache.tomcat/tomcat-catalina
@Override
public void login(String username, String password, Request request) throws ServletException {
Principal principal = doLogin(request, username, password);
register(request, request.getResponse(), principal, getAuthMethod(), username, password);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-tomcat7
@Override
public void login(String username, String password, Request request)
throws ServletException {
Principal principal = doLogin(request, username, password);
register(request, request.getResponse(), principal,
getAuthMethod(), username, password);
}
代码示例来源:origin: Waffle/waffle
@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 GenericPrincipal genericPrincipal = this.createPrincipal(windowsIdentity);
this.log.debug("roles: {}", String.join(", ", genericPrincipal.getRoles()));
return genericPrincipal;
} finally {
windowsIdentity.dispose();
}
}
代码示例来源:origin: com.github.dblock.waffle/waffle-tomcat8
@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();
}
}
代码示例来源:origin: org.apache.catalina/com.springsource.org.apache.catalina
@Override
public void login(String username, String password, Request request)
throws ServletException {
Principal principal = doLogin(request, username, password);
register(request, request.getResponse(), principal,
getAuthMethod(), username, password);
}
代码示例来源:origin: com.github.waffle/waffle-tomcat7
@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 GenericPrincipal genericPrincipal = this.createPrincipal(windowsIdentity);
this.log.debug("roles: {}", String.join(", ", genericPrincipal.getRoles()));
return genericPrincipal;
} finally {
windowsIdentity.dispose();
}
}
代码示例来源:origin: Waffle/waffle
@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 GenericPrincipal genericPrincipal = this.createPrincipal(windowsIdentity);
this.log.debug("roles: {}", String.join(", ", genericPrincipal.getRoles()));
return genericPrincipal;
} finally {
windowsIdentity.dispose();
}
}
代码示例来源:origin: Waffle/waffle
@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 GenericPrincipal genericPrincipal = this.createPrincipal(windowsIdentity);
this.log.debug("roles: {}", String.join(", ", genericPrincipal.getRoles()));
return genericPrincipal;
} finally {
windowsIdentity.dispose();
}
}
代码示例来源:origin: Waffle/waffle
@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 GenericPrincipal genericPrincipal = this.createPrincipal(windowsIdentity);
this.log.debug("roles: {}", String.join(", ", genericPrincipal.getRoles()));
return genericPrincipal;
} finally {
windowsIdentity.dispose();
}
}
代码示例来源:origin: codefollower/Tomcat-Research
@Override
public void login(String username, String password, Request request)
throws ServletException {
Principal principal = doLogin(request, username, password);
register(request, request.getResponse(), principal,
getAuthMethod(), username, password);
}
代码示例来源:origin: com.github.waffle/waffle-tomcat9
@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 GenericPrincipal genericPrincipal = this.createPrincipal(windowsIdentity);
this.log.debug("roles: {}", String.join(", ", genericPrincipal.getRoles()));
return genericPrincipal;
} finally {
windowsIdentity.dispose();
}
}
代码示例来源:origin: org.glassfish.main.web/web-core
@Override
public void login(String username, char[] password, HttpRequest request)
throws ServletException {
Principal principal = doLogin(request, username, password);
register(request, (HttpResponse)request.getResponse(), principal,
getAuthMethod(), username, password);
}
代码示例来源:origin: com.github.waffle/waffle-tomcat8
@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 GenericPrincipal genericPrincipal = this.createPrincipal(windowsIdentity);
this.log.debug("roles: {}", String.join(", ", genericPrincipal.getRoles()));
return genericPrincipal;
} finally {
windowsIdentity.dispose();
}
}
代码示例来源:origin: com.github.waffle/waffle-tomcat85
@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 GenericPrincipal genericPrincipal = this.createPrincipal(windowsIdentity);
this.log.debug("roles: {}", String.join(", ", genericPrincipal.getRoles()));
return genericPrincipal;
} finally {
windowsIdentity.dispose();
}
}
代码示例来源:origin: org.apache.geronimo.ext.tomcat/catalina
@Override
public void login(String username, String password, Request request)
throws ServletException {
Principal principal = doLogin(request, username, password);
register(request, request.getResponse(), principal,
getAuthMethod(), username, password);
}
代码示例来源:origin: com.ovea.tajin.server/tajin-server-jetty9
@Override
public void login(String username, String password, Request request)
throws ServletException {
Principal principal = doLogin(request, username, password);
register(request, request.getResponse(), principal,
getAuthMethod(), username, password);
}
代码示例来源:origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core
@Override
public void login(String username, String password, Request request) throws ServletException {
Principal principal = doLogin(request, username, password);
register(request, request.getResponse(), principal, getAuthMethod(), username, password);
}
代码示例来源:origin: com.ovea.tajin.servers/tajin-server-jetty9
@Override
public void login(String username, String password, Request request)
throws ServletException {
Principal principal = doLogin(request, username, password);
register(request, request.getResponse(), principal,
getAuthMethod(), username, password);
}
代码示例来源:origin: com.github.dblock.waffle/waffle-tomcat7
@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();
}
}
内容来源于网络,如有侵权,请联系作者删除!