Skip to content

Commit

Permalink
Updated generating adminToken in data folder (#598).
Browse files Browse the repository at this point in the history
Change-Id: I73e045016d14d8b82921b382a8415c90d7063545
  • Loading branch information
margaretha committed Apr 16, 2024
1 parent 0b110ed commit da1571c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 2 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
- Changed loading external kustvakt.conf and jdbc.properties
to use /data folder (#598)
- Added KoralQuery check when updating VC (solved #676)
- Setup vc-cache in the data folder (#598)
- Changed generating adminToken in the data folder (#598).


# version 0.73
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@
import org.springframework.web.context.support.XmlWebApplicationContext;

import de.ids_mannheim.korap.config.KustvaktConfiguration;
import de.ids_mannheim.korap.dao.AnnotationDao;
import de.ids_mannheim.korap.encryption.RandomCodeGenerator;
import de.ids_mannheim.korap.exceptions.KustvaktException;
import lombok.Getter;
Expand Down Expand Up @@ -114,11 +113,11 @@ protected void start ()
}

String adminToken = "";
File f = new File("adminToken");
File f = new File("data/adminToken");
if (!f.exists()) {
RandomCodeGenerator random = new RandomCodeGenerator();
adminToken = random.createRandomCode(config);
FileOutputStream fos = new FileOutputStream(new File("adminToken"));
FileOutputStream fos = new FileOutputStream(f);
OutputStreamWriter writer = new OutputStreamWriter(fos,
StandardCharsets.UTF_8.name());
writer.append("token=");
Expand Down

0 comments on commit da1571c

Please sign in to comment.