This project is a Spring Boot REST API integration example for Passwordless X1280 provided by Password Alliance.
This is a backend REST API service that integrates with Password Alliance's Passwordless X1280 authentication system. It provides both traditional password-based authentication and passwordless authentication capabilities, allowing users to authenticate using their mobile devices with QR code registration.
- Java: 21
- Spring Boot: 3.5.9
- Build Tool: Gradle
- MySQL: 8.x
- Lombok: Latest
Login with ID and password.
Request:
{
"id": "user123",
"password": "password123"
}Register a new user.
Request:
{
"id": "user123",
"password": "password123"
}Change user password.
Request:
{
"id": "user123",
"newPassword": "newpassword123"
}Delete current user account (requires login).
Logout current user.
Check if user is logged in.
Verify user credentials for passwordless management.
Parameters:
userId(String): User IDpassword(String): User password
Check if user has registered passwordless authentication.
Parameters:
userId(String): User ID
Register user for passwordless authentication.
Request:
{
"userId": "user123",
"token": "verification-token"
}Withdraw from passwordless authentication.
Request:
{
"userId": "user123",
"token": "verification-token"
}Get one-time token for passwordless authentication.
Parameters:
userId(String): User ID
Request passwordless authentication.
Parameters:
userId(String): User ID
Check passwordless authentication result.
Parameters:
userId(String): User IDsessionId(String): Session ID from authentication request
Cancel passwordless authentication request.
Parameters:
userId(String): User IDsessionId(String): Session ID from authentication request
Create MySQL database and table:
CREATE DATABASE passwordless CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE passwordless;
CREATE TABLE userinfo (
id VARCHAR(50) PRIMARY KEY,
pw VARCHAR(256) NOT NULL,
regdate TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);Edit src/main/resources/application.properties:
# DataSource
spring.datasource.url=jdbc:mysql://localhost:3306/passwordless
spring.datasource.username=your_username
spring.datasource.password=your_password
# Passwordless
passwordless.corp-id=your_corp_id
passwordless.server-id=your_server_id
passwordless.server-key=your_server_key
passwordless.rest-check-url=http://your-passwordless-server:11040
passwordless.push-connector-url=ws:your-passwordless-server:15010