SDK for using single of truth authentication service(vAuth) in other internal vOffice app with seamless integration.

Fund package maintenance!
voffice-indonesia

Installs: 68

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 3

pkg:composer/voffice-indonesia/core-sdk

v0.1.9 2025-07-31 08:12 UTC

README

A powerful, plug-and-play Laravel package for seamless OAuth integration with Laravel Passport servers. Built with Clean Architecture principles for enterprise-grade applications.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

โœจ Key Features

  • ๐Ÿš€ Plug & Play: Zero configuration, works out of the box
  • ๐Ÿ” Enterprise Security: OAuth2 + PKCE with automatic token refresh
  • ๐Ÿ—๏ธ Clean Architecture: SOLID principles, testable, maintainable
  • ๐ŸŽจ Modern UI: Livewire 3.0 components with Tailwind CSS
  • โšก Laravel Integration: Custom guards, Filament compatible, middleware
  • ๐Ÿงช Fully Tested: 33+ tests with comprehensive coverage

๐Ÿš€ Quick Start

1. Install

composer require voffice-indonesia/core-sdk

2. Setup

php artisan core:setup

3. Configure Environment

VAUTH_URL=https://your-oauth-server.com
VAUTH_CLIENT_ID=your-client-id
VAUTH_CLIENT_SECRET=your-client-secret
VAUTH_REDIRECT_URI=https://your-app.com/auth/oauth/callback

4. Protect Routes

Route::middleware(['vauth'])->group(function () {
    Route::get('/dashboard', [DashboardController::class, 'index']);
});

5. Use VAuth Service

use VoxDev\Core\Facades\VAuth;

// Get users from OAuth server
$users = VAuth::getUsers();

// Get locations
$locations = VAuth::getLocations();

// Check authentication
$isAuthenticated = VAuth::hasValidToken();

๐ŸŽ‰ That's it! Your app now has OAuth authentication!

๐Ÿ“š Documentation

๐Ÿ“– Complete Documentation

Getting Started

Usage Guides

Architecture & Advanced

Examples & Reference

๐ŸŽฏ Use Cases

This package is perfect for:

  • Internal company applications that need centralized authentication
  • Microservices architecture with shared authentication service
  • Multi-tenant applications with OAuth-based user management
  • Enterprise applications requiring clean, maintainable code
  • Rapid prototyping with plug-and-play OAuth integration

๐Ÿ› ๏ธ Requirements

  • PHP: 8.2+
  • Laravel: 10.x, 11.x, 12.x
  • Laravel Passport OAuth Server: Running and accessible

๐Ÿ”ง Advanced Features

Clean Architecture

Built with clean architecture principles:

  • Domain-driven design
  • Dependency inversion
  • SOLID principles
  • Fully testable

Auto-Configuration

Intelligent defaults that just work:

  • Auth guards auto-registered
  • Middleware auto-configured
  • Routes auto-loaded
  • Livewire components auto-registered

Enterprise Security

Production-ready security features:

  • OAuth2 with PKCE
  • Automatic token refresh
  • Secure cookie handling
  • Session optimization

๐Ÿงช Testing

composer test

The package includes comprehensive tests:

  • 33+ test cases
  • Feature and unit tests
  • Architecture tests
  • Clean code validation

๐Ÿ”„ Changelog

Please see CHANGELOG for recent changes.

๐Ÿค Contributing

Please see CONTRIBUTING for details.

๐Ÿ”’ Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

๐Ÿ“„ License

The MIT License (MIT). Please see License File for more information.

๐Ÿ™ Credits

Made with โค๏ธ by VOffice Indonesia