承接 ometra/caronte-sdk 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

ometra/caronte-sdk

Composer 安装命令:

composer require ometra/caronte-sdk

包简介

Caronte SDK

README 文档

README

This documentation follows the project's Coding Standards and PHPDoc Style Guide.

Project Overview

ometra/caronte-sdk is a Laravel package that integrates a host Laravel application with a centralized Caronte authentication server.

Main capabilities:

  • User authentication via Caronte (login, logout, 2FA, password recovery)
  • User token validation and renewal middleware
  • Management UI for users and role synchronization
  • Suite access management for application groups with non-root role synchronization
  • Application-to-application authentication middleware
  • Protected API access token validation and scope checks
  • Tenant-aware behavior for single-tenant and multi-tenant modes

Primary audience: internal development teams integrating Caronte into Laravel applications.

Project Type & Tech Summary

  • Project type: Laravel package (library), not a standalone app
  • PHP version: ^8.2
  • Laravel version: ^12.0
  • JWT stack: lcobucci/jwt ^5.3 and lcobucci/clock ^3.2
  • HTTP integration: Laravel HTTP client via package support classes
  • Database: uses host app database connection; publishes package migrations for local user cache tables
  • Cache: host app cache (OIDC JWKS cache uses Laravel Cache)
  • Queue: no package-owned queue workers required
  • External services: Caronte server HTTP API, optional OIDC issuer endpoints

Service HTTP client

Extend Ometra\Caronte\Support\CaronteHttpClient to call services with the configured application or application-group identity. JSON endpoints use applicationRequest() and userRequest(). For downloads and other responses that must not be parsed, use applicationRawRequest() or userRawRequest(); both return an Illuminate\Http\Client\Response.

Payloads containing Laravel UploadedFile instances or stream resources are sent as multipart automatically, including nested fields and lists of files. Authentication headers remain mutually exclusive: group-enabled applications send X-Group-Token; other applications send X-Application-Token.

$download = $client->applicationRawRequest(
    'GET',
    'reports/monthly.pdf'
);

$upload = $client->userRawRequest(
    'POST',
    'documents',
    [
        'title' => 'Contract',
        'file' => $request->file('document'),
    ]
);

Raw methods return Illuminate\Http\Client\Response and use Accept: */*. The existing parsed methods continue to use Accept: application/json and return the SDK's normalized response array.

Quick Start (High-Level)

  1. Install package dependencies in your host app with composer.
  2. Publish package configuration and migrations.
  3. Set required environment variables for CARONTE_URL, CARONTE_APP_CN, and CARONTE_APP_SECRET.
  4. Run migrations in the host application.
  5. Add package middleware to protected host routes.
  6. Synchronize configured roles and protected API scopes.
  7. Verify authentication and management routes in a local environment.

Full steps: see doc/deployment-instructions.md.

Suite Access

Applications that belong to a Caronte ApplicationGroup can use the SDK to manage tenant user access across the suite after the server grants these Caronte platform permissions to the application:

  • groups.roles.read
  • groups.users.read
  • groups.user_roles.write

The SDK exposes Ometra\Caronte\Api\GroupApi with:

  • showGroupRoles()
  • showGroupUsers(string $search = '')
  • syncGroupUserRoles(string $uriUser, string $appId, array $roleUris, ?string $actorToken = null)

The management UI includes a "Suite access" mode that lists tenant users, groups roles by application, and prevents selecting roles marked as non-manageable such as root.

Documentation Index

Standards Note

Examples and references in these docs follow the project instructions for coding conventions and PHPDoc style, using the package namespace and folder structure as the source of truth.

ometra/caronte-sdk 适用场景与选型建议

ometra/caronte-sdk 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 777 次下载、GitHub Stars 达 0, 最近一次更新时间为 2026 年 05 月 04 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 ometra/caronte-sdk 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 ometra/caronte-sdk 我们能提供哪些服务?
定制开发 / 二次开发

基于 ometra/caronte-sdk 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 777
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 31
  • 依赖项目数: 2
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-05-04