@@ -0,0 +1,1471 @@
+package com.google.sps.servlets;%0A%0Aimport com.google.appengine.api.datastore.DatastoreService;%0Aimport com.google.appengine.api.datastore.DatastoreServiceFactory;%0Aimport com.google.appengine.api.datastore.Entity;%0Aimport com.google.appengine.api.datastore.EntityNotFoundException;%0Aimport com.google.appengine.api.datastore.Key;%0Aimport com.google.appengine.api.datastore.KeyFactory;%0Aimport com.google.appengine.api.datastore.Transaction;%0Aimport com.google.firebase.auth.FirebaseAuth;%0Aimport com.google.firebase.auth.FirebaseAuthException;%0Aimport com.google.firebase.auth.UserRecord;%0Aimport com.google.sps.firebase.FirebaseAppManager;%0Aimport java.io.IOException;%0Aimport java.util.ArrayList;%0Aimport java.util.ConcurrentModificationException;%0Aimport javax.servlet.ServletConfig;%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.annotation.WebServlet;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0A// Once class owner submits a TA email, retrieve that user and add them as a TA to the class%0A@WebServlet(%22/create-user%22)%0Apublic class CreateUser extends HttpServlet %7B%0A%0A  private FirebaseAuth authInstance;%0A%0A  // Get the current session%0A  @Override%0A  public void init(ServletConfig config) throws ServletException %7B%0A    try %7B%0A      authInstance = FirebaseAuth.getInstance(FirebaseAppManager.getApp());%0A    %7D catch (IOException e) %7B%0A      throw new ServletException(e);%0A    %7D%0A  %7D%0A%0A  %0A%0A%7D

Create servlet for adding user entity.