plugins/transforms/mongodb/src/main/java/org/apache/hop/mongo/KerberosHelper.java
public static LoginContext login(String principal, MongoProperties props)
      throws MongoDbException {
    try {
      JaasAuthenticationMode authMode = lookupLoginAuthMode(props);
      String keytabFile = lookupKeytabFile(props);
      return KerberosUtil.loginAs(authMode, principal, keytabFile);
    } catch (LoginException ex) {
      throw new MongoDbException("Unable to authenticate as '" + principal + "'", ex);
    }
  }
/**
   * Log in to Kerberos with the principal using the configuration defined in the variable variables
   * provided.
   *
   * @param principal Principal to log in as.
   * @param props properties for this connection
   * @return The context for the logged in principal.
   * @throws MongoDbException if an error occurs while logging in.
   */
Log in to Kerberos with the principal using the configuration defined in the variable variables
provided.

@param principal Principal to log in as.
@param props properties for this connection
@return The context for the logged in principal.
@throws MongoDbException if an error occurs while logging in.
Log in to Kerberos with the principal using the configuration defined in the variable variables provided . @param principal Principal to log in as . @param props properties for this connection @return The context for the logged in principal . @throws MongoDbException if an error occurs while logging in .
public static LoginContext login(String principal, MongoProperties props)
      throws MongoDbException {
    try {
      JaasAuthenticationMode authMode = lookupLoginAuthMode(props);
      String keytabFile = lookupKeytabFile(props);
      return KerberosUtil.loginAs(authMode, principal, keytabFile);
    } catch (LoginException ex) {
      throw new MongoDbException("Unable to authenticate as '" + principal + "'", ex);
    }
  }
public static LoginContext login ( String principal , MongoProperties props ) throws MongoDbException { try { JaasAuthenticationMode authMode = lookupLoginAuthMode ( props ) ; String keytabFile = lookupKeytabFile ( props ) ; return KerberosUtil . loginAs ( authMode , principal , keytabFile ) ; } catch ( LoginException ex ) { throw new MongoDbException ( "Unable to authenticate as '" + principal + "'" , ex ) ; } }
Log in to Kerberos with the principal using the configuration defined in the variable variables
 provided.
Log in to Kerberos with the principal using the configuration defined in the variable variables provided .