If you're integrating FusionAuth with a Java application, this library will speed up your development time.
For additional information and documentation on FusionAuth refer to https://fusionauth.io.
String apiKey = "5a826da2-1e3a-49df-85ba-cd88575e4e9d";
FusionAuthClient client = new FusionAuthClient(apiKey, "http://localhost:9011");
UUID applicationId = UUID.fromString("68364852-7a38-4e15-8c48-394eceafa601");
LoginRequest request = new LoginRequest(applicationId, "joe@fusionauth.io", null, "abc123");
ClientResponse<LoginResponse, Errors> result = client.login(request);
if (!result.wasSuccessful()) {
// Error
}
// Hooray! Success
Add the dependency via Maven:
<dependency>
<groupId>io.fusionauth</groupId>
<artifactId>fusionauth-java-client</artifactId>
<version>1.46.0</version>
</dependency>
$ mvn install
Note: This project uses the Savant build tool. To compile using Savant, follow these instructions:
mkdir ~/savant
cd ~/savant
wget http://savant.inversoft.org/org/savantbuild/savant-core/2.0.0-RC.6/savant-2.0.0-RC.6.tar.gz
tar xvfz savant-2.0.0-RC.6.tar.gz
ln -s ./savant-2.0.0-RC.6 current
export PATH=$PATH:~/savant/current/bin/
Then, perform an integration build of the project by running:
$ sb int
For more information, checkout savantbuild.org.
If you have a question or support issue regarding this client library, we'd love to hear from you.
If you have a paid edition with support included, please open a ticket in your account portal. Learn more about paid editions here.
Otherwise, please post your question in the community forum.
Bug reports and pull requests are welcome on GitHub at https://github.com/FusionAuth/fusionauth-java-client.
This code is available as open source under the terms of the Apache v2.0 License.