use of com.mysql.cj.callback.UsernameCallback in project ABC by RuiPinto96274.
the class AuthenticationKerberosClient method setAuthenticationParameters.
@Override
public void setAuthenticationParameters(String user, String password) {
this.user = user;
this.password = password;
if (this.user == null) {
try {
// Try to obtain the user name from a cached TGT.
initializeAuthentication();
int pos = this.cachedPrincipalName.indexOf('@');
if (pos >= 0) {
this.user = this.cachedPrincipalName.substring(0, pos);
} else {
this.user = this.cachedPrincipalName;
}
} catch (CJException e) {
// Fall-back to system login user.
this.user = System.getProperty("user.name");
}
if (this.usernameCallbackHandler != null) {
this.usernameCallbackHandler.handle(new UsernameCallback(this.user));
}
}
}
use of com.mysql.cj.callback.UsernameCallback in project JavaSegundasQuintas by ecteruel.
the class AuthenticationKerberosClient method setAuthenticationParameters.
@Override
public void setAuthenticationParameters(String user, String password) {
this.user = user;
this.password = password;
if (this.user == null) {
try {
// Try to obtain the user name from a cached TGT.
initializeAuthentication();
int pos = this.cachedPrincipalName.indexOf('@');
if (pos >= 0) {
this.user = this.cachedPrincipalName.substring(0, pos);
} else {
this.user = this.cachedPrincipalName;
}
} catch (CJException e) {
// Fall-back to system login user.
this.user = System.getProperty("user.name");
}
if (this.usernameCallbackHandler != null) {
this.usernameCallbackHandler.handle(new UsernameCallback(this.user));
}
}
}
use of com.mysql.cj.callback.UsernameCallback in project JavaSegundasQuintas by ecteruel.
the class AuthenticationLdapSaslClientPlugin method setAuthenticationParameters.
@Override
public void setAuthenticationParameters(String user, String password) {
this.user = user;
this.password = password;
if (this.user == null) {
// Fall-back to system login user.
this.user = System.getProperty("user.name");
if (this.usernameCallbackHandler != null) {
this.usernameCallbackHandler.handle(new UsernameCallback(this.user));
}
}
}
use of com.mysql.cj.callback.UsernameCallback in project aws-mysql-jdbc by awslabs.
the class AuthenticationKerberosClient method setAuthenticationParameters.
@Override
public void setAuthenticationParameters(String user, String password) {
this.user = user;
this.password = password;
if (this.user == null) {
try {
// Try to obtain the user name from a cached TGT.
initializeAuthentication();
int pos = this.cachedPrincipalName.indexOf('@');
if (pos >= 0) {
this.user = this.cachedPrincipalName.substring(0, pos);
} else {
this.user = this.cachedPrincipalName;
}
} catch (CJException e) {
// Fall-back to system login user.
this.user = System.getProperty("user.name");
}
if (this.usernameCallbackHandler != null) {
this.usernameCallbackHandler.handle(new UsernameCallback(this.user));
}
}
}
use of com.mysql.cj.callback.UsernameCallback in project aws-mysql-jdbc by awslabs.
the class AuthenticationLdapSaslClientPlugin method setAuthenticationParameters.
@Override
public void setAuthenticationParameters(String user, String password) {
this.user = user;
this.password = password;
if (this.user == null) {
// Fall-back to system login user.
this.user = System.getProperty("user.name");
if (this.usernameCallbackHandler != null) {
this.usernameCallbackHandler.handle(new UsernameCallback(this.user));
}
}
}
Aggregations