Skip to content

Authentication Test API

Welcome to the Authentication Test API documentation. This is a RESTful API server providing user schedule management with OAuth 2.0 authentication via Keycloak.

Overview

The Authentication Test API is a production-ready Java application built with:

  • Java 21 - Modern Java features and performance
  • OpenLiberty 24.0.0.1 - Lightweight, cloud-native application server
  • Jakarta EE 10 - Enterprise Java standards
  • MicroProfile 6.1 - Microservices-optimized APIs
  • Keycloak OAuth 2.0 - Industry-standard authentication

Key Features

Health Check Endpoint - Public endpoint for monitoring server status
Secured Schedule API - JWT-protected user schedule management
Role-Based Access Control - Fine-grained authorization with Keycloak roles
OpenAPI 3.0 Documentation - Interactive API documentation with Swagger UI
Comprehensive Error Handling - Consistent error responses across all endpoints
Container Support - Ready for deployment with Podman or Docker
Production Ready - Logging, monitoring, and security best practices

Architecture

┌─────────────┐         ┌──────────────────┐         ┌─────────────┐
│   Client    │────────▶│  Authentication  │────────▶│  Keycloak   │
│ Application │         │    Test API      │         │   Server    │
└─────────────┘         └──────────────────┘         └─────────────┘
                               │ JWT Validation
                        ┌──────▼──────┐
                        │  Schedule   │
                        │   Service   │
                        └─────────────┘

API Endpoints

Public Endpoints

  • GET /api/v1/hello - Health check and server information

Protected Endpoints

  • GET /api/v1/schedule - Retrieve user schedule (requires JWT token and schedule-user role)

Technology Stack

Component Technology Version
Language Java 21+
Application Server OpenLiberty 24.0.0.1
Framework Jakarta EE 10
Microservices MicroProfile 6.1
Build Tool Maven 3.9+
Authentication Keycloak Latest
Container Runtime Podman/Docker Latest

Getting Started

To get started with the Authentication Test API:

  1. Check Prerequisites - Ensure you have the required tools
  2. Build the Application - Compile and package the API
  3. Configure SSL Certificates - Setup trust for self-signed certificates (if needed)
  4. Setup Keycloak - Configure authentication server
  5. Realm Configuration
  6. Client Configuration
  7. User Management
  8. Groups Claim Mapper
  9. Run the Server - Start the API server
  10. Test the API - Make your first API calls

Support

For issues, questions, or contributions:

  • 📧 Email: support@example.com
  • 🐛 Issues: GitHub Issues
  • 📖 Documentation: This site

License

This project is licensed under the Apache License 2.0. See the LICENSE file for details.