public class org.apache.shiro.authc.pam.ModularRealmAuthenticator extends org.apache.shiro.authc.AbstractAuthenticator
{
private static final org.slf4j.Logger log;
private java.util.Collection realms;
private org.apache.shiro.authc.pam.AuthenticationStrategy authenticationStrategy;
public void <init>()
{
org.apache.shiro.authc.pam.AtLeastOneSuccessfulStrategy v;
org.apache.shiro.authc.pam.ModularRealmAuthenticator v;
v := @this: org.apache.shiro.authc.pam.ModularRealmAuthenticator;
specialinvoke v.<org.apache.shiro.authc.AbstractAuthenticator: void <init>()>();
v = new org.apache.shiro.authc.pam.AtLeastOneSuccessfulStrategy;
specialinvoke v.<org.apache.shiro.authc.pam.AtLeastOneSuccessfulStrategy: void <init>()>();
v.<org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.apache.shiro.authc.pam.AuthenticationStrategy authenticationStrategy> = v;
return;
}
public void setRealms(java.util.Collection)
{
org.apache.shiro.authc.pam.ModularRealmAuthenticator v;
java.util.Collection v;
v := @this: org.apache.shiro.authc.pam.ModularRealmAuthenticator;
v := @parameter: java.util.Collection;
v.<org.apache.shiro.authc.pam.ModularRealmAuthenticator: java.util.Collection realms> = v;
return;
}
protected java.util.Collection getRealms()
{
org.apache.shiro.authc.pam.ModularRealmAuthenticator v;
java.util.Collection v;
v := @this: org.apache.shiro.authc.pam.ModularRealmAuthenticator;
v = v.<org.apache.shiro.authc.pam.ModularRealmAuthenticator: java.util.Collection realms>;
return v;
}
public org.apache.shiro.authc.pam.AuthenticationStrategy getAuthenticationStrategy()
{
org.apache.shiro.authc.pam.AuthenticationStrategy v;
org.apache.shiro.authc.pam.ModularRealmAuthenticator v;
v := @this: org.apache.shiro.authc.pam.ModularRealmAuthenticator;
v = v.<org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.apache.shiro.authc.pam.AuthenticationStrategy authenticationStrategy>;
return v;
}
public void setAuthenticationStrategy(org.apache.shiro.authc.pam.AuthenticationStrategy)
{
org.apache.shiro.authc.pam.AuthenticationStrategy v;
org.apache.shiro.authc.pam.ModularRealmAuthenticator v;
v := @this: org.apache.shiro.authc.pam.ModularRealmAuthenticator;
v := @parameter: org.apache.shiro.authc.pam.AuthenticationStrategy;
v.<org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.apache.shiro.authc.pam.AuthenticationStrategy authenticationStrategy> = v;
return;
}
protected void assertRealmsConfigured() throws java.lang.IllegalStateException
{
java.lang.IllegalStateException v;
org.apache.shiro.authc.pam.ModularRealmAuthenticator v;
java.util.Collection v;
boolean v;
v := @this: org.apache.shiro.authc.pam.ModularRealmAuthenticator;
v = virtualinvoke v.<org.apache.shiro.authc.pam.ModularRealmAuthenticator: java.util.Collection getRealms()>();
v = staticinvoke <org.apache.shiro.util.CollectionUtils: boolean isEmpty(java.util.Collection)>(v);
if v == 0 goto label;
v = new java.lang.IllegalStateException;
specialinvoke v.<java.lang.IllegalStateException: void <init>(java.lang.String)>("Configuration error:  No realms have been configured!  One or more realms must be present to execute an authentication attempt.");
throw v;
label:
return;
}
protected org.apache.shiro.authc.AuthenticationInfo doSingleRealmAuthentication(org.apache.shiro.realm.Realm, org.apache.shiro.authc.AuthenticationToken)
{
org.apache.shiro.authc.AuthenticationInfo v;
org.apache.shiro.authc.AuthenticationToken v;
org.apache.shiro.authc.pam.ModularRealmAuthenticator v;
org.apache.shiro.realm.Realm v;
java.lang.String v, v;
org.apache.shiro.authc.UnknownAccountException v;
org.apache.shiro.authc.pam.UnsupportedTokenException v;
boolean v;
v := @this: org.apache.shiro.authc.pam.ModularRealmAuthenticator;
v := @parameter: org.apache.shiro.realm.Realm;
v := @parameter: org.apache.shiro.authc.AuthenticationToken;
v = interfaceinvoke v.<org.apache.shiro.realm.Realm: boolean supports(org.apache.shiro.authc.AuthenticationToken)>(v);
if v != 0 goto label;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (org.apache.shiro.realm.Realm,org.apache.shiro.authc.AuthenticationToken)>(v, 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[])>("Realm [\u] does not support authentication token [\u].  Please ensure that the appropriate Realm implementation is configured correctly or that the realm accepts AuthenticationTokens of this type.");
v = new org.apache.shiro.authc.pam.UnsupportedTokenException;
specialinvoke v.<org.apache.shiro.authc.pam.UnsupportedTokenException: void <init>(java.lang.String)>(v);
throw v;
label:
v = interfaceinvoke v.<org.apache.shiro.realm.Realm: org.apache.shiro.authc.AuthenticationInfo getAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken)>(v);
if v != null goto label;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (org.apache.shiro.realm.Realm,org.apache.shiro.authc.AuthenticationToken)>(v, 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[])>("Realm [\u] was unable to find account data for the submitted AuthenticationToken [\u].");
v = new org.apache.shiro.authc.UnknownAccountException;
specialinvoke v.<org.apache.shiro.authc.UnknownAccountException: void <init>(java.lang.String)>(v);
throw v;
label:
return v;
}
protected org.apache.shiro.authc.AuthenticationInfo doMultiRealmAuthentication(java.util.Collection, org.apache.shiro.authc.AuthenticationToken)
{
java.lang.Throwable v, v;
org.apache.shiro.authc.AuthenticationToken v;
org.apache.shiro.authc.pam.AuthenticationStrategy v;
java.lang.Integer v;
org.apache.shiro.authc.pam.ModularRealmAuthenticator v;
int v;
java.lang.String v;
boolean v, v, v, v;
org.apache.shiro.authc.AuthenticationInfo v, v, v;
org.slf4j.Logger v, v, v, v, v, v;
java.util.Iterator v;
java.util.Collection v;
org.apache.shiro.authc.pam.ShortCircuitIterationException v;
java.lang.Object v;
v := @this: org.apache.shiro.authc.pam.ModularRealmAuthenticator;
v := @parameter: java.util.Collection;
v := @parameter: org.apache.shiro.authc.AuthenticationToken;
v = virtualinvoke v.<org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.apache.shiro.authc.pam.AuthenticationStrategy getAuthenticationStrategy()>();
v = interfaceinvoke v.<org.apache.shiro.authc.pam.AuthenticationStrategy: org.apache.shiro.authc.AuthenticationInfo beforeAllAttempts(java.util.Collection,org.apache.shiro.authc.AuthenticationToken)>(v, v);
v = <org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.slf4j.Logger log>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isTraceEnabled()>();
if v == 0 goto label;
v = <org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.slf4j.Logger log>;
v = interfaceinvoke v.<java.util.Collection: int size()>();
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<org.slf4j.Logger: void trace(java.lang.String,java.lang.Object)>("Iterating through {} realms for PAM authentication", v);
label:
v = interfaceinvoke v.<java.util.Collection: 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()>();
label:
v = interfaceinvoke v.<org.apache.shiro.authc.pam.AuthenticationStrategy: org.apache.shiro.authc.AuthenticationInfo beforeAttempt(org.apache.shiro.realm.Realm,org.apache.shiro.authc.AuthenticationToken,org.apache.shiro.authc.AuthenticationInfo)>(v, v, v);
label:
goto label;
label:
v := @caughtexception;
goto label;
label:
v = interfaceinvoke v.<org.apache.shiro.realm.Realm: boolean supports(org.apache.shiro.authc.AuthenticationToken)>(v);
if v == 0 goto label;
v = <org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.slf4j.Logger log>;
interfaceinvoke v.<org.slf4j.Logger: void trace(java.lang.String,java.lang.Object,java.lang.Object)>("Attempting to authenticate token [{}] using realm [{}]", v, v);
v = null;
v = null;
label:
v = interfaceinvoke v.<org.apache.shiro.realm.Realm: org.apache.shiro.authc.AuthenticationInfo getAuthenticationInfo(org.apache.shiro.authc.AuthenticationToken)>(v);
label:
goto label;
label:
v := @caughtexception;
v = v;
v = <org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.slf4j.Logger log>;
v = interfaceinvoke v.<org.slf4j.Logger: boolean isDebugEnabled()>();
if v == 0 goto label;
v = dynamicinvoke "makeConcatWithConstants" <java.lang.String (org.apache.shiro.realm.Realm)>(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[])>("Realm [\u] threw an exception during a multi-realm authentication attempt:");
v = <org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.slf4j.Logger log>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Throwable)>(v, v);
label:
v = interfaceinvoke v.<org.apache.shiro.authc.pam.AuthenticationStrategy: org.apache.shiro.authc.AuthenticationInfo afterAttempt(org.apache.shiro.realm.Realm,org.apache.shiro.authc.AuthenticationToken,org.apache.shiro.authc.AuthenticationInfo,org.apache.shiro.authc.AuthenticationInfo,java.lang.Throwable)>(v, v, v, v, v);
goto label;
label:
v = <org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.slf4j.Logger log>;
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object,java.lang.Object)>("Realm [{}] does not support token {}.  Skipping realm.", v, v);
goto label;
label:
v = interfaceinvoke v.<org.apache.shiro.authc.pam.AuthenticationStrategy: org.apache.shiro.authc.AuthenticationInfo afterAllAttempts(org.apache.shiro.authc.AuthenticationToken,org.apache.shiro.authc.AuthenticationInfo)>(v, v);
return v;
catch org.apache.shiro.authc.pam.ShortCircuitIterationException from label to label with label;
catch java.lang.Throwable from label to label with label;
}
protected org.apache.shiro.authc.AuthenticationInfo doAuthenticate(org.apache.shiro.authc.AuthenticationToken) throws org.apache.shiro.authc.AuthenticationException
{
org.apache.shiro.authc.AuthenticationInfo v, v;
java.util.Iterator v;
java.util.Collection v;
org.apache.shiro.authc.AuthenticationToken v;
org.apache.shiro.authc.pam.ModularRealmAuthenticator v;
int v;
java.lang.Object v;
v := @this: org.apache.shiro.authc.pam.ModularRealmAuthenticator;
v := @parameter: org.apache.shiro.authc.AuthenticationToken;
virtualinvoke v.<org.apache.shiro.authc.pam.ModularRealmAuthenticator: void assertRealmsConfigured()>();
v = virtualinvoke v.<org.apache.shiro.authc.pam.ModularRealmAuthenticator: java.util.Collection getRealms()>();
v = interfaceinvoke v.<java.util.Collection: int size()>();
if v != 1 goto label;
v = interfaceinvoke v.<java.util.Collection: java.util.Iterator iterator()>();
v = interfaceinvoke v.<java.util.Iterator: java.lang.Object next()>();
v = virtualinvoke v.<org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.apache.shiro.authc.AuthenticationInfo doSingleRealmAuthentication(org.apache.shiro.realm.Realm,org.apache.shiro.authc.AuthenticationToken)>(v, v);
return v;
label:
v = virtualinvoke v.<org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.apache.shiro.authc.AuthenticationInfo doMultiRealmAuthentication(java.util.Collection,org.apache.shiro.authc.AuthenticationToken)>(v, v);
return v;
}
public void onLogout(org.apache.shiro.subject.PrincipalCollection)
{
java.util.Iterator v;
java.util.Collection v;
org.apache.shiro.authc.pam.ModularRealmAuthenticator v;
org.apache.shiro.realm.Realm v;
java.lang.Object v;
org.apache.shiro.subject.PrincipalCollection v;
boolean v, v, v;
v := @this: org.apache.shiro.authc.pam.ModularRealmAuthenticator;
v := @parameter: org.apache.shiro.subject.PrincipalCollection;
specialinvoke v.<org.apache.shiro.authc.AbstractAuthenticator: void onLogout(org.apache.shiro.subject.PrincipalCollection)>(v);
v = virtualinvoke v.<org.apache.shiro.authc.pam.ModularRealmAuthenticator: java.util.Collection getRealms()>();
v = staticinvoke <org.apache.shiro.util.CollectionUtils: boolean isEmpty(java.util.Collection)>(v);
if v != 0 goto label;
v = interfaceinvoke v.<java.util.Collection: 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 = v instanceof org.apache.shiro.authc.LogoutAware;
if v == 0 goto label;
interfaceinvoke v.<org.apache.shiro.authc.LogoutAware: void onLogout(org.apache.shiro.subject.PrincipalCollection)>(v);
goto label;
label:
return;
}
static void <clinit>()
{
org.slf4j.Logger v;
v = staticinvoke <org.slf4j.LoggerFactory: org.slf4j.Logger getLogger(java.lang.Class)>(class "Lorg/apache/shiro/authc/pam/ModularRealmAuthenticator;");
<org.apache.shiro.authc.pam.ModularRealmAuthenticator: org.slf4j.Logger log> = v;
return;
}
}