MCPcopy Create free account
hub / github.com/BaseXdb/basex / init

Method init

basex-core/src/main/java/org/basex/core/users/Users.java:114–122  ·  view source on GitHub ↗

Creates an initial admin password and writes it to the logs. @param ctx database context

(final Context ctx)

Source from the content-addressed store, hash-verified

112 * @param ctx database context
113 */
114 public synchronized void init(final Context ctx) {
115 if(file.exists()) return;
116
117 final String pw = UUID.randomUUID().toString();
118 get(ADMIN).password(pw);
119 write();
120 ctx.log.writeServer(LogType.INFO,
121 "Initial " + ADMIN + " password (change after first login): " + pw);
122 }
123
124 /**
125 * Adds a user.

Callers

nothing calls this directly

Calls 6

getMethod · 0.95
writeMethod · 0.95
writeServerMethod · 0.80
toStringMethod · 0.65
passwordMethod · 0.65
existsMethod · 0.45

Tested by

no test coverage detected