public void addAuthentication(UserEntity userEntity, UserAuthenticationType authenticationType, String key) throws AmbariException {
    switch (authenticationType) {
      case LOCAL:
        addLocalAuthentication(userEntity, key);
        break;
      case LDAP:
        addLdapAuthentication(userEntity, key);
        break;
      case JWT:
        addJWTAuthentication(userEntity, key);
        break;
      case PAM:
        addPamAuthentication(userEntity, key);
        break;
      case KERBEROS:
        addKerberosAuthentication(userEntity, key);
        break;
      default:
        throw new AmbariException("Unexpected user authentication type");
    }
  }
Adds a new authentication type for the given user.

@param userEntity         the user
@param authenticationType the authentication type
@param key                the relevant key
@throws AmbariException
@see #addLocalAuthentication(UserEntity, String)
@see #addLdapAuthentication(UserEntity, String)
@see #addJWTAuthentication(UserEntity, String)
@see #addKerberosAuthentication(UserEntity, String)
@see #addPamAuthentication(UserEntity, String)
ambari-server/src/main/java/org/apache/ambari/server/security/authorization/Users.java