Merge pull request #2750 from stianst/master

KEYCLOAK-2927 Rename add-user script to add-user-keycloak
This commit is contained in:
Bill Burke 2016-04-27 11:05:26 -04:00
commit 35a9527407
6 changed files with 16 additions and 26 deletions

View file

@ -80,12 +80,12 @@
<outputDirectory>standalone/configuration</outputDirectory> <outputDirectory>standalone/configuration</outputDirectory>
</file> </file>
<file> <file>
<source>${project.build.directory}/unpacked/keycloak-${project.version}/bin/add-user.sh</source> <source>${project.build.directory}/unpacked/keycloak-${project.version}/bin/add-user-keycloak.sh</source>
<outputDirectory>bin</outputDirectory> <outputDirectory>bin</outputDirectory>
<destName>add-user-keycloak.sh</destName> <destName>add-user-keycloak.sh</destName>
</file> </file>
<file> <file>
<source>${project.build.directory}/unpacked/keycloak-${project.version}/bin/add-user.bat</source> <source>${project.build.directory}/unpacked/keycloak-${project.version}/bin/add-user-keycloak.bat</source>
<outputDirectory>bin</outputDirectory> <outputDirectory>bin</outputDirectory>
<destName>add-user-keycloak.bat</destName> <destName>add-user-keycloak.bat</destName>
</file> </file>

View file

@ -97,6 +97,16 @@
<section> <section>
<title>Version specific migration</title> <title>Version specific migration</title>
<section>
<title>Migrating to 1.9.3</title>
<simplesect>
<title>Add User script renamed</title>
<para>
The script to add admin users to Keycloak has been renamed to <literal>add-user-keycloak</literal>.
</para>
</simplesect>
</section>
<section> <section>
<title>Migrating to 1.9.2</title> <title>Migrating to 1.9.2</title>
<simplesect> <simplesect>

View file

@ -117,22 +117,16 @@ bin/jboss-cli.sh --file=bin/keycloak-install-ha.cli
<para> <para>
To access the admin console to configure Keycloak you need an account to login. There is no built in user, To access the admin console to configure Keycloak you need an account to login. There is no built in user,
instead you have to first create an admin account. This can done either by opening <ulink url="http://localhost:8080/auth">http://localhost:8080/auth</ulink> instead you have to first create an admin account. This can done either by opening <ulink url="http://localhost:8080/auth">http://localhost:8080/auth</ulink>
(creating a user through the browser can only be done through localhost) or you can use the add-user script from (creating a user through the browser can only be done through localhost) or you can use the add-user-keycloak script from
the command-line. the command-line.
</para> </para>
<para> <para>
The <literal>add-user</literal> script creates a temporary file with the details of the user, The <literal>add-user-keycloak</literal> script creates a temporary file with the details of the user,
which are imported at startup. To add a user with this script run: which are imported at startup. To add a user with this script run:
<programlisting><![CDATA[ <programlisting><![CDATA[
bin/add-user.[sh|bat] -r master -u <username> -p <password>
]]></programlisting>
Then restart the server.
</para>
<para>
For <literal>keycloak-overlay</literal>, please make sure to use:
<programlisting><![CDATA[
bin/add-user-keycloak.[sh|bat] -r master -u <username> -p <password> bin/add-user-keycloak.[sh|bat] -r master -u <username> -p <password>
]]></programlisting> ]]></programlisting>
Then restart the server.
</para> </para>
</section> </section>

View file

@ -42,7 +42,6 @@ import java.io.FileInputStream;
import java.io.FileOutputStream; import java.io.FileOutputStream;
import java.io.IOException; import java.io.IOException;
import java.lang.reflect.Method; import java.lang.reflect.Method;
import java.util.Arrays;
import java.util.HashMap; import java.util.HashMap;
import java.util.LinkedList; import java.util.LinkedList;
import java.util.List; import java.util.List;
@ -64,13 +63,7 @@ public class AddUser {
System.exit(1); System.exit(1);
} }
if (command.isContainer()) { if (command.isHelp()) {
List<String> l = new LinkedList<>(Arrays.asList(args));
l.remove("--container");
args = l.toArray(new String[l.size()]);
org.jboss.as.domain.management.security.adduser.AddUser.main(args);
} else if (command.isHelp()) {
printHelp(command); printHelp(command);
} else { } else {
try { try {
@ -273,9 +266,6 @@ public class AddUser {
@Option(hasValue = false, description = "Enable domain mode") @Option(hasValue = false, description = "Enable domain mode")
private boolean domain; private boolean domain;
@Option(hasValue = false, description = "Add user to underlying container. For usage use '--container --help'")
private boolean container;
@Option(hasValue = true, description = "Define the location of the server config directory") @Option(hasValue = true, description = "Define the location of the server config directory")
private String sc; private String sc;
@ -314,10 +304,6 @@ public class AddUser {
return domain; return domain;
} }
public boolean isContainer() {
return container;
}
public String getSc() { public String getSc() {
return sc; return sc;
} }