class org.finos.legend.engine.postgres.AuthenticationContext extends java.lang.Object implements java.io.Closeable
{
private org.finos.legend.engine.postgres.auth.SecureString password;
private final java.lang.String userName;
private final org.slf4j.Logger logger;
private final org.finos.legend.engine.postgres.auth.AuthenticationMethod authMethod;
private final org.finos.legend.engine.postgres.ConnectionProperties connProperties;
void <init>(org.finos.legend.engine.postgres.auth.AuthenticationMethod, org.finos.legend.engine.postgres.ConnectionProperties, java.lang.String, org.slf4j.Logger)
{
org.slf4j.Logger v;
org.finos.legend.engine.postgres.ConnectionProperties v;
org.finos.legend.engine.postgres.auth.AuthenticationMethod v;
java.lang.String v;
org.finos.legend.engine.postgres.AuthenticationContext v;
v := @this: org.finos.legend.engine.postgres.AuthenticationContext;
v := @parameter: org.finos.legend.engine.postgres.auth.AuthenticationMethod;
v := @parameter: org.finos.legend.engine.postgres.ConnectionProperties;
v := @parameter: java.lang.String;
v := @parameter: org.slf4j.Logger;
specialinvoke v.<java.lang.Object: void <init>()>();
v.<org.finos.legend.engine.postgres.AuthenticationContext: org.finos.legend.engine.postgres.auth.AuthenticationMethod authMethod> = v;
v.<org.finos.legend.engine.postgres.AuthenticationContext: org.finos.legend.engine.postgres.ConnectionProperties connProperties> = v;
v.<org.finos.legend.engine.postgres.AuthenticationContext: java.lang.String userName> = v;
v.<org.finos.legend.engine.postgres.AuthenticationContext: org.slf4j.Logger logger> = v;
v.<org.finos.legend.engine.postgres.AuthenticationContext: org.finos.legend.engine.postgres.auth.SecureString password> = null;
return;
}
org.finos.legend.engine.shared.core.identity.Identity authenticate()
{
org.finos.legend.engine.postgres.auth.SecureString v;
org.finos.legend.engine.shared.core.identity.Identity v;
org.slf4j.Logger v;
org.finos.legend.engine.postgres.ConnectionProperties v;
org.finos.legend.engine.postgres.auth.AuthenticationMethodType v;
org.finos.legend.engine.postgres.AuthenticationContext v;
org.finos.legend.engine.postgres.auth.AuthenticationMethod v, v;
java.lang.String v, v;
v := @this: org.finos.legend.engine.postgres.AuthenticationContext;
v = v.<org.finos.legend.engine.postgres.AuthenticationContext: org.finos.legend.engine.postgres.auth.AuthenticationMethod authMethod>;
v = v.<org.finos.legend.engine.postgres.AuthenticationContext: java.lang.String userName>;
v = v.<org.finos.legend.engine.postgres.AuthenticationContext: org.finos.legend.engine.postgres.auth.SecureString password>;
v = v.<org.finos.legend.engine.postgres.AuthenticationContext: org.finos.legend.engine.postgres.ConnectionProperties connProperties>;
v = interfaceinvoke v.<org.finos.legend.engine.postgres.auth.AuthenticationMethod: org.finos.legend.engine.shared.core.identity.Identity authenticate(java.lang.String,org.finos.legend.engine.postgres.auth.SecureString,org.finos.legend.engine.postgres.ConnectionProperties)>(v, v, v);
if v == null goto label;
v = v.<org.finos.legend.engine.postgres.AuthenticationContext: org.slf4j.Logger logger>;
v = virtualinvoke v.<org.finos.legend.engine.shared.core.identity.Identity: java.lang.String getName()>();
v = v.<org.finos.legend.engine.postgres.AuthenticationContext: org.finos.legend.engine.postgres.auth.AuthenticationMethod authMethod>;
v = interfaceinvoke v.<org.finos.legend.engine.postgres.auth.AuthenticationMethod: org.finos.legend.engine.postgres.auth.AuthenticationMethodType name()>();
interfaceinvoke v.<org.slf4j.Logger: void trace(java.lang.String,java.lang.Object,java.lang.Object)>("Authentication succeeded user \"{}\" and method \"{}\".", v, v);
label:
return v;
}
org.finos.legend.engine.postgres.auth.AuthenticationMethodType getAuthenticationMethodType()
{
org.finos.legend.engine.postgres.auth.AuthenticationMethod v;
org.finos.legend.engine.postgres.auth.AuthenticationMethodType v;
org.finos.legend.engine.postgres.AuthenticationContext v;
v := @this: org.finos.legend.engine.postgres.AuthenticationContext;
v = v.<org.finos.legend.engine.postgres.AuthenticationContext: org.finos.legend.engine.postgres.auth.AuthenticationMethod authMethod>;
v = interfaceinvoke v.<org.finos.legend.engine.postgres.auth.AuthenticationMethod: org.finos.legend.engine.postgres.auth.AuthenticationMethodType name()>();
return v;
}
void setSecurePassword(char[])
{
org.finos.legend.engine.postgres.auth.SecureString v;
char[] v;
org.finos.legend.engine.postgres.AuthenticationContext v;
v := @this: org.finos.legend.engine.postgres.AuthenticationContext;
v := @parameter: char[];
v = new org.finos.legend.engine.postgres.auth.SecureString;
specialinvoke v.<org.finos.legend.engine.postgres.auth.SecureString: void <init>(char[])>(v);
v.<org.finos.legend.engine.postgres.AuthenticationContext: org.finos.legend.engine.postgres.auth.SecureString password> = v;
return;
}
public void close()
{
org.finos.legend.engine.postgres.auth.SecureString v, v;
org.finos.legend.engine.postgres.AuthenticationContext v;
v := @this: org.finos.legend.engine.postgres.AuthenticationContext;
v = v.<org.finos.legend.engine.postgres.AuthenticationContext: org.finos.legend.engine.postgres.auth.SecureString password>;
if v == null goto label;
v = v.<org.finos.legend.engine.postgres.AuthenticationContext: org.finos.legend.engine.postgres.auth.SecureString password>;
virtualinvoke v.<org.finos.legend.engine.postgres.auth.SecureString: void close()>();
label:
return;
}
}