public LoginConfig digestAuth(final String realmName) { if (basic) { throw UndertowMessages.MESSAGES.authTypeCannotBeCombined("digest", "basic"); } else if (form) { throw UndertowMessages.MESSAGES.authTypeCannotBeCombined("digest", "form"); } digest = true; this.realmName = realmName; return this; }
public LoginConfig formAuth(final String loginPage, final String errorPage) { if (digest) { throw UndertowMessages.MESSAGES.authTypeCannotBeCombined("form", "digest"); } else if (basic) { throw UndertowMessages.MESSAGES.authTypeCannotBeCombined("form", "basic"); } this.loginPage = loginPage; this.errorPage = errorPage; form = true; return this; }