Codota Logo
LoginConfig.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.apache.tomcat.util.descriptor.web.LoginConfig
constructor

Best Java code snippets using org.apache.tomcat.util.descriptor.web.LoginConfig.<init> (Showing top 7 results out of 315)

  • Common ways to obtain LoginConfig
private void myMethod () {
LoginConfig l =
  • Codota Iconnew LoginConfig()
  • Codota IconContext context;context.getLoginConfig()
  • Codota IconMixedAuthenticator mixedAuthenticator;mixedAuthenticator.context.getLoginConfig()
  • Smart code suggestions by Codota
}
origin: OryxProject/oryx

LoginConfig loginConfig = new LoginConfig();
loginConfig.setAuthMethod("DIGEST");
loginConfig.setRealmName(InMemoryRealm.NAME);
origin: codefollower/Tomcat-Research

@Override
public void lifecycleEvent(LifecycleEvent event) {
  try {
    Context context = (Context) event.getLifecycle();
    if (event.getType().equals(Lifecycle.CONFIGURE_START_EVENT)) {
      context.setConfigured(true);
    }
    // LoginConfig is required to process @ServletSecurity
    // annotations
    if (context.getLoginConfig() == null) {
      context.setLoginConfig(
          new LoginConfig("NONE", null, null, null));
      context.getPipeline().addValve(new NonLoginAuthenticator());
    }
  } catch (ClassCastException e) {
    return;
  }
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

  @Override
  public void lifecycleEvent(LifecycleEvent event) {
    try {
      Context context = (Context) event.getLifecycle();
      if (event.getType().equals(Lifecycle.CONFIGURE_START_EVENT)) {
        context.setConfigured(true);
        // Process annotations
        WebAnnotationSet.loadApplicationAnnotations(context);
        // LoginConfig is required to process @ServletSecurity
        // annotations
        if (context.getLoginConfig() == null) {
          context.setLoginConfig(new LoginConfig("NONE", null, null, null));
          context.getPipeline().addValve(new NonLoginAuthenticator());
        }
      }
    } catch (ClassCastException e) {
    }
  }
}
origin: org.apache.tomcat/tomcat-catalina

  @Override
  public void lifecycleEvent(LifecycleEvent event) {
    try {
      Context context = (Context) event.getLifecycle();
      if (event.getType().equals(Lifecycle.CONFIGURE_START_EVENT)) {
        context.setConfigured(true);
        // Process annotations
        WebAnnotationSet.loadApplicationAnnotations(context);
        // LoginConfig is required to process @ServletSecurity
        // annotations
        if (context.getLoginConfig() == null) {
          context.setLoginConfig(new LoginConfig("NONE", null, null, null));
          context.getPipeline().addValve(new NonLoginAuthenticator());
        }
      }
    } catch (ClassCastException e) {
    }
  }
}
origin: com.github.jsimone/webapp-runner-main

static void enableBasicAuth(Context ctx, boolean enableSSL) {
 LoginConfig loginConfig = new LoginConfig();
 loginConfig.setAuthMethod("BASIC");
 ctx.setLoginConfig(loginConfig);
 ctx.addSecurityRole(AUTH_ROLE);
 SecurityConstraint securityConstraint = new SecurityConstraint();
 securityConstraint.addAuthRole(AUTH_ROLE);
 if (enableSSL) {
  securityConstraint.setUserConstraint(TransportGuarantee.CONFIDENTIAL.toString());
 }
 SecurityCollection securityCollection = new SecurityCollection();
 securityCollection.addPattern("/*");
 securityConstraint.addCollection(securityCollection);
 ctx.addConstraint(securityConstraint);
}
origin: jsimone/webapp-runner

static void enableBasicAuth(Context ctx, boolean enableSSL) {
 LoginConfig loginConfig = new LoginConfig();
 loginConfig.setAuthMethod("BASIC");
 ctx.setLoginConfig(loginConfig);
 ctx.addSecurityRole(AUTH_ROLE);
 SecurityConstraint securityConstraint = new SecurityConstraint();
 securityConstraint.addAuthRole(AUTH_ROLE);
 if (enableSSL) {
  securityConstraint.setUserConstraint(TransportGuarantee.CONFIDENTIAL.toString());
 }
 SecurityCollection securityCollection = new SecurityCollection();
 securityCollection.addPattern("/*");
 securityConstraint.addCollection(securityCollection);
 ctx.addConstraint(securityConstraint);
}
origin: org.keycloak/keycloak-spring-boot-adapter-core

public void customize(Context context) {
  LoginConfig loginConfig = new LoginConfig();
  loginConfig.setAuthMethod("KEYCLOAK");
  context.setLoginConfig(loginConfig);
org.apache.tomcat.util.descriptor.webLoginConfig<init>

Javadoc

Construct a new LoginConfig with default properties.

Popular methods of LoginConfig

  • getErrorPage
  • getLoginPage
  • setAuthMethod
  • getAuthMethod
  • setErrorPage
  • setLoginPage
  • setRealmName
  • getRealmName
  • equals

Popular in Java

  • Creating JSON documents from java classes using gson
  • findViewById (Activity)
  • compareTo (BigDecimal)
    Compares this BigDecimal with the specified BigDecimal. Two BigDecimal objects that are equal in val
  • setRequestProperty (URLConnection)
    Sets the general request property. If a property with the key already exists, overwrite its value wi
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Point (java.awt)
    A point representing a location in (x, y) coordinate space, specified in integer precision.
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now