Warning
This repository is generated from content that lives at github.com/FusionAuth/fusionauth-site. Changes to files here will be overwritten by that automation. File an issue or pull request with fusionauth-site instead.
This example shows shell scripts illustrating how to use FusionAuth's powerful user search.
You will need the following things properly installed on your computer.
- Git: Presumably you already have this on your machine if you are looking at this project locally; if not, use your platform's package manager to install git, and
git clonethis repo. - Docker: If you wish to run FusionAuth from within a Docker container.
To install, do the following in a shell/Terminal window:
git clone https://github.com/fusionauth/fusionauth-example-user-searchcd fusionauth-example-user-search: This is the root of the example.
This example assumes that you will run FusionAuth from a Docker container. In the root of this project directory (next to this README) are two files a Docker compose file and an environment variables configuration file. Assuming you have Docker installed on your machine, a docker-compose up from within this (root) directory will bring FusionAuth up on your machine.
The FusionAuth configuration files also make use of a unique feature of FusionAuth, called Kickstart: when FusionAuth comes up for the first time, it will look at the Kickstart file and mimic API calls to configure FusionAuth for use. It will perform all the necessary setup to make this demo work correctly.
Click here to verify it is up and running.
NOTE: If you ever want to reset the FusionAuth system, delete the volumes created by docker-compose by executing
docker-compose down -v. FusionAuth will only apply the Kickstart settings when it is first run (e.g., it has no data configured for it yet).
To run, do the following:
- In one shell, run
docker-compose up - In another shell,
cd examples. There are three directories, one for each kind of search.
There is one shell script, examples/search.sh that you can run. It takes an argument of a -request.json file.
examples/search.sh examples/ids/ids-request.jsonruns the ids searchexamples/search.sh examples/query/user-data-simple-request.jsonruns one of the query searches
Here's a FusionAuth user search guide which corresponds to this example application.