Example usage for org.apache.shiro.web.env IniWebEnvironment getIni

List of usage examples for org.apache.shiro.web.env IniWebEnvironment getIni

Introduction

In this page you can find the example usage for org.apache.shiro.web.env IniWebEnvironment getIni.

Prototype

public Ini getIni() 

Source Link

Document

Returns the Ini instance reflecting this WebEnvironment's configuration.

Usage

From source file:org.seaborne.auth.shiro.DigestHttpAuthenticationFilterIniPassword.java

License:Apache License

private Section usersSection(ServletContext servletContext) {
    if (!initialized) {
        synchronized (this) {
            try {
                if (initialized)
                    return usersSection;
                initialized = true;/*from   w w  w .  java 2  s . c  o  m*/
                IniWebEnvironment env = (IniWebEnvironment) WebUtils.getWebEnvironment(servletContext);
                usersSection = env.getIni().getSection("users");
            } catch (Exception ex) {
                LoggerFactory.getLogger(getClass()).error("Failed to find the shiro.ini [users] section");
            }
        }
    }
    return usersSection;
}