public LoginConfig(String mechanismName, String realmName, String loginPage, String errorPage) { this.realmName = realmName; this.loginPage = loginPage; this.errorPage = errorPage; addFirstAuthMethod(mechanismName); }
public SipLoginConfig(String mechanismName, String realmName, String loginPage, String errorPage) { super(realmName, loginPage, errorPage); super.addFirstAuthMethod(mechanismName); }
public SipLoginConfig(String mechanismName, String realmName, String loginPage, String errorPage) { super(realmName, loginPage, errorPage); super.addFirstAuthMethod(mechanismName); }
/** * Adds an authentication mechanism directly to the deployment. This mechanism will be first in the list. * * In general you should just use {@link #addAuthenticationMechanism(String, io.undertow.security.api.AuthenticationMechanismFactory)} * and allow the user to configure the methods they want by name. * * This method is essentially a convenience method, if is the same as registering a factory under the provided name that returns * and authentication mechanism, and then adding it to the login config list. * * If you want your mechanism to be the only one in the deployment you should first invoke {@link #clearLoginMethods()}. * * @param name The authentication mechanism name * @param mechanism The mechanism * @return this deployment info */ public DeploymentInfo addFirstAuthenticationMechanism(final String name, final AuthenticationMechanism mechanism) { authenticationMechanisms.put(name, new ImmediateAuthenticationMechanismFactory(mechanism)); if(loginConfig == null) { loginConfig = new LoginConfig(null); } loginConfig.addFirstAuthMethod(new AuthMethodConfig(name)); return this; }
public void customize(DeploymentInfo deploymentInfo) { io.undertow.servlet.api.LoginConfig loginConfig = new io.undertow.servlet.api.LoginConfig(keycloakProperties.getRealm()); loginConfig.addFirstAuthMethod("KEYCLOAK"); deploymentInfo.setLoginConfig(loginConfig); deploymentInfo.addInitParameter("keycloak.config.resolver", KeycloakSpringBootConfigResolverWrapper.class.getName()); deploymentInfo.addSecurityConstraints(getSecurityConstraints()); deploymentInfo.addServletExtension(new KeycloakServletExtension()); }
loginConfig.addFirstAuthMethod( BASIC_LOGIN_MECHANISM );