Package io.undertow.servlet.api

Examples of io.undertow.servlet.api.LoginConfig


    protected static Logger log = Logger.getLogger(KeycloakServletExtension.class);

    // todo when this DeploymentInfo method of the same name is fixed.
    public boolean isAuthenticationMechanismPresent(DeploymentInfo deploymentInfo, final String mechanismName) {
        LoginConfig loginConfig = deploymentInfo.getLoginConfig();
        if(loginConfig != null) {
            for(AuthMethodConfig method : loginConfig.getAuthMethods()) {
                if(method.getName().equalsIgnoreCase(mechanismName)) {
                    return true;
                }
            }
        }
View Full Code Here


        SecurityConstraint constraint = new SecurityConstraint();
        WebResourceCollection collection = new WebResourceCollection();
        collection.addUrlPattern("/*");
        constraint.addWebResourceCollection(collection);
        constraint.addRoleAllowed("manager");
        LoginConfig loginConfig = new LoginConfig("FORM", "Test Realm");

        ResourceManager resourceManager = new TestResourceManager(warResourcePath);

        DeploymentInfo deploymentInfo = new DeploymentInfo()
                .setClassLoader(classLoader)
View Full Code Here

      }
      constraint.addWebResourceCollection(webCollection);
      constraint.addRoleAllowed("REST");
      deployment.addSecurityConstraint(constraint);

      LoginConfig login = new LoginConfig("ApplicationRealm").addFirstAuthMethod(authMethod);
      deployment.setLoginConfig(login);
      deployment.addSecurityRole("REST");

      SecurityDomainContext securityDomainContext = securityDomainContextInjector.getValue();
      deployment.setIdentityManager(new JAASIdentityManagerImpl(securityDomainContext));
View Full Code Here

TOP

Related Classes of io.undertow.servlet.api.LoginConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.