Example usage for org.apache.shiro.config IniSecurityManagerFactory MAIN_SECTION_NAME

List of usage examples for org.apache.shiro.config IniSecurityManagerFactory MAIN_SECTION_NAME

Introduction

In this page you can find the example usage for org.apache.shiro.config IniSecurityManagerFactory MAIN_SECTION_NAME.

Prototype

String MAIN_SECTION_NAME

To view the source code for org.apache.shiro.config IniSecurityManagerFactory MAIN_SECTION_NAME.

Click Source Link

Usage

From source file:be.rubus.octopus.jsr375.demo.jsr375.JSR375ConfigurationPlugin.java

License:Apache License

@Override
public void addConfiguration(Ini ini) {
    Ini.Section mainSection = ini.get(IniSecurityManagerFactory.MAIN_SECTION_NAME);
    mainSection.put("jsr375Matcher", IdentityStoreMatcher.class.getName());
    mainSection.put("credentialsMatcher.matcher", "$jsr375Matcher");

}

From source file:com.stormpath.shiro.servlet.env.StormpathShiroIniEnvironment.java

License:Apache License

private Ini.Section getConfigSection(Ini ini) {

    Ini.Section configSection = ini.getSection(IniSecurityManagerFactory.MAIN_SECTION_NAME);
    if (CollectionUtils.isEmpty(configSection)) {
        configSection = ini.getSection(Ini.DEFAULT_SECTION_NAME);
        if (configSection == null) {
            configSection = ini.addSection(Ini.DEFAULT_SECTION_NAME);
        }// w w w. j a  v a  2 s  . c  o  m
    }

    return configSection;
}