public class org.apache.shiro.config.IniSecurityManagerFactory extends org.apache.shiro.config.IniFactorySupport
{
public static final java.lang.String MAIN_SECTION_NAME;
public static final java.lang.String SECURITY_MANAGER_NAME;
public static final java.lang.String INI_REALM_NAME;
private static final transient org.slf4j.Logger log;
private org.apache.shiro.config.ReflectionBuilder builder;
public void <init>()
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.config.ReflectionBuilder v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
specialinvoke v.<org.apache.shiro.config.IniFactorySupport: void <init>()>();
v = new org.apache.shiro.config.ReflectionBuilder;
specialinvoke v.<org.apache.shiro.config.ReflectionBuilder: void <init>()>();
v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.config.ReflectionBuilder builder> = v;
return;
}
public void <init>(org.apache.shiro.config.Ini)
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.config.Ini v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: org.apache.shiro.config.Ini;
specialinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: void <init>()>();
virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: void setIni(org.apache.shiro.config.Ini)>(v);
return;
}
public void <init>(java.lang.String)
{
org.apache.shiro.config.IniSecurityManagerFactory v;
java.lang.String v;
org.apache.shiro.config.Ini v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: java.lang.String;
v = staticinvoke <org.apache.shiro.config.Ini: org.apache.shiro.config.Ini fromResourcePath(java.lang.String)>(v);
specialinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: void <init>(org.apache.shiro.config.Ini)>(v);
return;
}
public java.util.Map getBeans()
{
org.apache.shiro.config.IniSecurityManagerFactory v;
java.util.Map v, v;
org.apache.shiro.config.ReflectionBuilder v, v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v = v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.config.ReflectionBuilder builder>;
if v == null goto label;
v = v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.config.ReflectionBuilder builder>;
v = virtualinvoke v.<org.apache.shiro.config.ReflectionBuilder: java.util.Map getObjects()>();
v = staticinvoke <java.util.Collections: java.util.Map unmodifiableMap(java.util.Map)>(v);
goto label;
label:
v = null;
label:
return v;
}
public void destroy()
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.config.ReflectionBuilder v, v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v = virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.config.ReflectionBuilder getReflectionBuilder()>();
if v == null goto label;
v = virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.config.ReflectionBuilder getReflectionBuilder()>();
virtualinvoke v.<org.apache.shiro.config.ReflectionBuilder: void destroy()>();
label:
return;
}
private org.apache.shiro.mgt.SecurityManager getSecurityManagerBean()
{
org.apache.shiro.config.IniSecurityManagerFactory v;
java.lang.Object v;
org.apache.shiro.config.ReflectionBuilder v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v = virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.config.ReflectionBuilder getReflectionBuilder()>();
v = virtualinvoke v.<org.apache.shiro.config.ReflectionBuilder: java.lang.Object getBean(java.lang.String,java.lang.Class)>("securityManager", class "Lorg/apache/shiro/mgt/SecurityManager;");
return v;
}
protected org.apache.shiro.mgt.SecurityManager createDefaultInstance()
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.mgt.DefaultSecurityManager v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v = new org.apache.shiro.mgt.DefaultSecurityManager;
specialinvoke v.<org.apache.shiro.mgt.DefaultSecurityManager: void <init>()>();
return v;
}
protected org.apache.shiro.mgt.SecurityManager createInstance(org.apache.shiro.config.Ini)
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.mgt.SecurityManager v;
org.apache.shiro.config.ConfigurationException v;
org.apache.shiro.config.Ini v;
java.lang.String v;
java.lang.NullPointerException v;
boolean v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: org.apache.shiro.config.Ini;
v = staticinvoke <org.apache.shiro.util.CollectionUtils: boolean isEmpty(java.util.Map)>(v);
if v == 0 goto label;
v = new java.lang.NullPointerException;
specialinvoke v.<java.lang.NullPointerException: void <init>(java.lang.String)>("Ini argument cannot be null or empty.");
throw v;
label:
v = specialinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.mgt.SecurityManager createSecurityManager(org.apache.shiro.config.Ini)>(v);
if v != null goto label;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.Class)>(class "Lorg/apache/shiro/mgt/SecurityManager;") <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("\u instance cannot be null.");
v = new org.apache.shiro.config.ConfigurationException;
specialinvoke v.<org.apache.shiro.config.ConfigurationException: void <init>(java.lang.String)>(v);
throw v;
label:
return v;
}
private org.apache.shiro.mgt.SecurityManager createSecurityManager(org.apache.shiro.config.Ini)
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.mgt.SecurityManager v;
org.apache.shiro.config.Ini v;
org.apache.shiro.config.Ini$Section v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: org.apache.shiro.config.Ini;
v = specialinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.config.Ini$Section getConfigSection(org.apache.shiro.config.Ini)>(v);
v = specialinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.mgt.SecurityManager createSecurityManager(org.apache.shiro.config.Ini,org.apache.shiro.config.Ini$Section)>(v, v);
return v;
}
private org.apache.shiro.config.Ini$Section getConfigSection(org.apache.shiro.config.Ini)
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.config.Ini v;
org.apache.shiro.config.Ini$Section v;
boolean v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: org.apache.shiro.config.Ini;
v = virtualinvoke v.<org.apache.shiro.config.Ini: org.apache.shiro.config.Ini$Section getSection(java.lang.String)>("main");
v = staticinvoke <org.apache.shiro.util.CollectionUtils: boolean isEmpty(java.util.Map)>(v);
if v == 0 goto label;
v = virtualinvoke v.<org.apache.shiro.config.Ini: org.apache.shiro.config.Ini$Section getSection(java.lang.String)>("");
label:
return v;
}
protected boolean isAutoApplyRealms(org.apache.shiro.mgt.SecurityManager)
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.mgt.SecurityManager v;
org.slf4j.Logger v;
java.util.Collection v;
boolean v, v, v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: org.apache.shiro.mgt.SecurityManager;
v = 1;
v = v instanceof org.apache.shiro.mgt.RealmSecurityManager;
if v == 0 goto label;
v = virtualinvoke v.<org.apache.shiro.mgt.RealmSecurityManager: java.util.Collection getRealms()>();
v = staticinvoke <org.apache.shiro.util.CollectionUtils: boolean isEmpty(java.util.Collection)>(v);
if v != 0 goto label;
v = <org.apache.shiro.config.IniSecurityManagerFactory: org.slf4j.Logger log>;
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String)>("Realms have been explicitly set on the SecurityManager instance - auto-setting of realms will not occur.");
v = 0;
label:
return v;
}
private org.apache.shiro.mgt.SecurityManager createSecurityManager(org.apache.shiro.config.Ini, org.apache.shiro.config.Ini$Section)
{
java.util.Collection v;
org.apache.shiro.config.ReflectionBuilder v;
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.mgt.SecurityManager v;
org.apache.shiro.config.Ini v;
java.util.Map v, v;
org.apache.shiro.config.Ini$Section v;
boolean v, v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: org.apache.shiro.config.Ini;
v := @parameter: org.apache.shiro.config.Ini$Section;
v = virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.config.ReflectionBuilder getReflectionBuilder()>();
v = virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: java.util.Map createDefaults(org.apache.shiro.config.Ini,org.apache.shiro.config.Ini$Section)>(v, v);
virtualinvoke v.<org.apache.shiro.config.ReflectionBuilder: void setObjects(java.util.Map)>(v);
v = specialinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: java.util.Map buildInstances(org.apache.shiro.config.Ini$Section)>(v);
v = specialinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.mgt.SecurityManager getSecurityManagerBean()>();
v = virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: boolean isAutoApplyRealms(org.apache.shiro.mgt.SecurityManager)>(v);
if v == 0 goto label;
v = specialinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: java.util.Collection getRealms(java.util.Map)>(v);
v = staticinvoke <org.apache.shiro.util.CollectionUtils: boolean isEmpty(java.util.Collection)>(v);
if v != 0 goto label;
virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: void applyRealmsToSecurityManager(java.util.Collection,org.apache.shiro.mgt.SecurityManager)>(v, v);
label:
return v;
}
protected java.util.Map createDefaults(org.apache.shiro.config.Ini, org.apache.shiro.config.Ini$Section)
{
java.util.LinkedHashMap v;
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.mgt.SecurityManager v;
org.apache.shiro.config.Ini v;
org.apache.shiro.realm.Realm v;
java.util.Map v;
org.apache.shiro.config.Ini$Section v;
boolean v, v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: org.apache.shiro.config.Ini;
v := @parameter: org.apache.shiro.config.Ini$Section;
v = new java.util.LinkedHashMap;
specialinvoke v.<java.util.LinkedHashMap: void <init>()>();
v = virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.mgt.SecurityManager createDefaultInstance()>();
interfaceinvoke v.<java.util.Map: java.lang.Object put(java.lang.Object,java.lang.Object)>("securityManager", v);
v = virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: boolean shouldImplicitlyCreateRealm(org.apache.shiro.config.Ini)>(v);
if v == 0 goto label;
v = virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.realm.Realm createRealm(org.apache.shiro.config.Ini)>(v);
if v == null goto label;
interfaceinvoke v.<java.util.Map: java.lang.Object put(java.lang.Object,java.lang.Object)>("iniRealm", v);
label:
v = virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: java.util.Map getDefaults()>();
v = staticinvoke <org.apache.shiro.util.CollectionUtils: boolean isEmpty(java.util.Map)>(v);
if v != 0 goto label;
interfaceinvoke v.<java.util.Map: void putAll(java.util.Map)>(v);
label:
return v;
}
private java.util.Map buildInstances(org.apache.shiro.config.Ini$Section)
{
org.apache.shiro.config.IniSecurityManagerFactory v;
java.util.Map v;
org.apache.shiro.config.ReflectionBuilder v;
org.apache.shiro.config.Ini$Section v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: org.apache.shiro.config.Ini$Section;
v = virtualinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.config.ReflectionBuilder getReflectionBuilder()>();
v = virtualinvoke v.<org.apache.shiro.config.ReflectionBuilder: java.util.Map buildObjects(java.util.Map)>(v);
return v;
}
private void addToRealms(java.util.Collection, org.apache.shiro.realm.RealmFactory)
{
org.apache.shiro.config.IniSecurityManagerFactory v;
java.util.Collection v, v;
org.apache.shiro.realm.RealmFactory v;
boolean v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: java.util.Collection;
v := @parameter: org.apache.shiro.realm.RealmFactory;
staticinvoke <org.apache.shiro.util.LifecycleUtils: void init(java.lang.Object)>(v);
v = interfaceinvoke v.<org.apache.shiro.realm.RealmFactory: java.util.Collection getRealms()>();
v = staticinvoke <org.apache.shiro.util.CollectionUtils: boolean isEmpty(java.util.Collection)>(v);
if v != 0 goto label;
interfaceinvoke v.<java.util.Collection: boolean addAll(java.util.Collection)>(v);
label:
return;
}
private java.util.Collection getRealms(java.util.Map)
{
java.util.ArrayList v;
org.apache.shiro.realm.Realm v;
java.util.Map v;
java.lang.String v, v, v;
boolean v, v, v, v, v;
org.slf4j.Logger v, v;
java.util.Iterator v;
java.util.Set v;
org.apache.shiro.config.IniSecurityManagerFactory v;
java.lang.Class v, v;
java.lang.Object v, v, v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: java.util.Map;
v = new java.util.ArrayList;
specialinvoke v.<java.util.ArrayList: void <init>()>();
v = interfaceinvoke v.<java.util.Map: java.util.Set entrySet()>();
v = interfaceinvoke v.<java.util.Set: java.util.Iterator iterator()>();
label:
v = interfaceinvoke v.<java.util.Iterator: boolean hasNext()>();
if v == 0 goto label;
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = interfaceinvoke v.<java.util.Map$Entry: java.lang.Object getKey()>();
v = interfaceinvoke v.<java.util.Map$Entry: java.lang.Object getValue()>();
v = v instanceof org.apache.shiro.realm.RealmFactory;
if v == 0 goto label;
specialinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: void addToRealms(java.util.Collection,org.apache.shiro.realm.RealmFactory)>(v, v);
goto label;
label:
v = v instanceof org.apache.shiro.realm.Realm;
if v == 0 goto label;
v = interfaceinvoke v.<org.apache.shiro.realm.Realm: java.lang.String getName()>();
if v == null goto label;
v = virtualinvoke v.<java.lang.Object: java.lang.Class getClass()>();
v = virtualinvoke v.<java.lang.Class: java.lang.String getName()>();
v = virtualinvoke v.<java.lang.String: boolean startsWith(java.lang.String)>(v);
if v == 0 goto label;
label:
v = v instanceof org.apache.shiro.util.Nameable;
if v == 0 goto label;
interfaceinvoke v.<org.apache.shiro.util.Nameable: void setName(java.lang.String)>(v);
v = <org.apache.shiro.config.IniSecurityManagerFactory: org.slf4j.Logger log>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object,java.lang.Object)>("Applied name \'{}\' to Nameable realm instance {}", v, v);
goto label;
label:
v = <org.apache.shiro.config.IniSecurityManagerFactory: org.slf4j.Logger log>;
v = class "Lorg/apache/shiro/util/Nameable;";
v = virtualinvoke v.<java.lang.Class: java.lang.String getName()>();
interfaceinvoke v.<org.slf4j.Logger: void info(java.lang.String,java.lang.Object)>("Realm does not implement the {} interface.  Configured name will not be applied.", v);
label:
interfaceinvoke v.<java.util.List: boolean add(java.lang.Object)>(v);
goto label;
label:
return v;
}
private void assertRealmSecurityManager(org.apache.shiro.mgt.SecurityManager)
{
java.lang.NullPointerException v;
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.mgt.SecurityManager v;
org.apache.shiro.config.ConfigurationException v;
java.lang.Class v;
java.lang.String v, v;
boolean v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: org.apache.shiro.mgt.SecurityManager;
if v != null goto label;
v = new java.lang.NullPointerException;
specialinvoke v.<java.lang.NullPointerException: void <init>(java.lang.String)>("securityManager instance cannot be null");
throw v;
label:
v = v instanceof org.apache.shiro.mgt.RealmSecurityManager;
if v != 0 goto label;
v = class "Lorg/apache/shiro/mgt/RealmSecurityManager;";
v = virtualinvoke v.<java.lang.Class: java.lang.String getName()>();
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (java.lang.String)>(v) <java.lang.invoke.StringConcatFactory: java.lang.invoke.CallSite makeConcatWithConstants(java.lang.invoke.MethodHandles$Lookup,java.lang.String,java.lang.invoke.MethodType,java.lang.String,java.lang.Object[])>("securityManager instance is not a \u instance.  This is required to access or configure realms on the instance.");
v = new org.apache.shiro.config.ConfigurationException;
specialinvoke v.<org.apache.shiro.config.ConfigurationException: void <init>(java.lang.String)>(v);
throw v;
label:
return;
}
protected void applyRealmsToSecurityManager(java.util.Collection, org.apache.shiro.mgt.SecurityManager)
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.mgt.SecurityManager v;
java.util.Collection v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: java.util.Collection;
v := @parameter: org.apache.shiro.mgt.SecurityManager;
specialinvoke v.<org.apache.shiro.config.IniSecurityManagerFactory: void assertRealmSecurityManager(org.apache.shiro.mgt.SecurityManager)>(v);
virtualinvoke v.<org.apache.shiro.mgt.RealmSecurityManager: void setRealms(java.util.Collection)>(v);
return;
}
protected boolean shouldImplicitlyCreateRealm(org.apache.shiro.config.Ini)
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.config.Ini v;
org.apache.shiro.config.Ini$Section v, v;
boolean v, v, v, v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: org.apache.shiro.config.Ini;
v = staticinvoke <org.apache.shiro.util.CollectionUtils: boolean isEmpty(java.util.Map)>(v);
if v != 0 goto label;
v = virtualinvoke v.<org.apache.shiro.config.Ini: org.apache.shiro.config.Ini$Section getSection(java.lang.String)>("roles");
v = staticinvoke <org.apache.shiro.util.CollectionUtils: boolean isEmpty(java.util.Map)>(v);
if v == 0 goto label;
v = virtualinvoke v.<org.apache.shiro.config.Ini: org.apache.shiro.config.Ini$Section getSection(java.lang.String)>("users");
v = staticinvoke <org.apache.shiro.util.CollectionUtils: boolean isEmpty(java.util.Map)>(v);
if v != 0 goto label;
label:
v = 1;
goto label;
label:
v = 0;
label:
return v;
}
protected org.apache.shiro.realm.Realm createRealm(org.apache.shiro.config.Ini)
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.realm.text.IniRealm v;
org.apache.shiro.config.Ini v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: org.apache.shiro.config.Ini;
v = new org.apache.shiro.realm.text.IniRealm;
specialinvoke v.<org.apache.shiro.realm.text.IniRealm: void <init>()>();
virtualinvoke v.<org.apache.shiro.realm.text.IniRealm: void setName(java.lang.String)>("iniRealm");
virtualinvoke v.<org.apache.shiro.realm.text.IniRealm: void setIni(org.apache.shiro.config.Ini)>(v);
return v;
}
public org.apache.shiro.config.ReflectionBuilder getReflectionBuilder()
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.config.ReflectionBuilder v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v = v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.config.ReflectionBuilder builder>;
return v;
}
public void setReflectionBuilder(org.apache.shiro.config.ReflectionBuilder)
{
org.apache.shiro.config.IniSecurityManagerFactory v;
org.apache.shiro.config.ReflectionBuilder v;
v := @this: org.apache.shiro.config.IniSecurityManagerFactory;
v := @parameter: org.apache.shiro.config.ReflectionBuilder;
v.<org.apache.shiro.config.IniSecurityManagerFactory: org.apache.shiro.config.ReflectionBuilder builder> = v;
return;
}
static void <clinit>()
{
org.slf4j.Logger v;
v = staticinvoke <org.slf4j.LoggerFactory: org.slf4j.Logger getLogger(java.lang.Class)>(class "Lorg/apache/shiro/config/IniSecurityManagerFactory;");
<org.apache.shiro.config.IniSecurityManagerFactory: org.slf4j.Logger log> = v;
return;
}
}