code: public static AuthCode loadFromMap(Map<String, Object> map) {
          AuthCode authCode = new AuthCode();
          authCode.code = (String) map.get("code");
          authCode.clientId = (String) map.get("LOCAL_NODE_ID");
          authCode.redirectUri = (String) map.get("redirectUri");
          authCode.state = (String) map.get("state");
          authCode.scope = (String) map.get("scope");
          authCode.type = (String) map.get("type");
          authCode.valid = (Boolean) map.get("valid");
          authCode.userId = (String) map.get("userId");
          authCode.created = (Long) map.get("created");
          authCode.id = map.get("_id").toString();
          return authCode;
      }
docs: Used to create an instance when a record from DB is loaded.
  
  @param map Map that contains the record info
  @return instance of AuthCode