https://github.com/duosecurity/duo_universal_java
Duo OIDC-based two-factor authentication for Java web applications
https://github.com/duosecurity/duo_universal_java
duo java mfa
Last synced: 10 months ago
JSON representation
Duo OIDC-based two-factor authentication for Java web applications
- Host: GitHub
- URL: https://github.com/duosecurity/duo_universal_java
- Owner: duosecurity
- License: other
- Created: 2020-10-16T00:45:39.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2025-02-07T22:25:58.000Z (12 months ago)
- Last Synced: 2025-03-30T10:06:52.572Z (10 months ago)
- Topics: duo, java, mfa
- Language: Java
- Homepage: https://duo.com/docs/duoweb
- Size: 115 KB
- Stars: 16
- Watchers: 33
- Forks: 23
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
README
# Duo Universal Prompt Java Client
[](https://github.com/duosecurity/duo_universal_java/actions)
[](https://github.com/duosecurity/duo_universal_java/issues)
[](https://github.com/duosecurity/duo_universal_java/network/members)
[](https://github.com/duosecurity/duo_universal_java/stargazers)
[](https://github.com/duosecurity/duo_universal_java/blob/master/LICENSE)
This library allows a web developer to quickly add Duo's interactive, self-service, two-factor authentication to any Java web login form.
See our developer documentation at http://www.duosecurity.com/docs/duoweb for guidance on integrating Duo 2FA into your web application.
What's here:
* `duo-universal-sdk` - The Duo SDK for interacting with the Duo Universal Prompt
* `duo-example` - An example web application with Duo integrated
# Usage
This library requires Java 8 or later (tested through Java 16) and uses Maven to build the JAR files.
Run `mvn package` to generate a JAR with dependencies, suitable for inclusion in a web application.
The Duo Universal Client for Java is available from Duo Security on Maven. Include the following in your dependency definitions:
```
com.duosecurity
duo-universal-sdk
1.2.0
```
See https://mvnrepository.com/artifact/com.duosecurity/duo-universal-sdk/1.2.0 for more details.
## TLS 1.2 and 1.3 Support
Duo_universal_java uses the Java cryptography libraries for TLS operations. Both TLS 1.2 and 1.3 are supported by Java 8 and later versions.
# Demo
## Build
From the root directory run:
`mvn clean install`
## Run
In order to run this project, ensure the values in `application.properties` are filled out with the values
from the Duo Admin Panel (clientId, clientSecret, api.host, and redirect.uri)
From the root of the `duo-example` project run the following to start the server:
`mvn spring-boot:run`
Navigate to to see a mock user login form. Enter a Duo username and any password to initiate Duo 2FA.
# Testing
From the root directory run:
`mvn test`
# Linting
From the root directory run:
`mvn checkstyle:check`
# Support
Please report any bugs, feature requests, or issues to us directly at support@duosecurity.com.
Thank you for using Duo!
http://www.duosecurity.com/