承接 aetah/jose 相关项目开发

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

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

aetah/jose

Composer 安装命令:

composer require aetah/jose

包简介

Generic PHP library for JOSE and compact JWS processing primitives

README 文档

README

This repository is a read-only split of aetah/php-openid-toolkit.

  • Development happens in the monorepo.
  • Feature PRs and issues should be opened against aetah/php-openid-toolkit.
  • This split repository is published from the monorepo and should not be treated as the source of truth.

JOSE

Generic PHP library for low-level JOSE and compact JWS processing primitives.

Scope

This package is designed as a reusable base for aetah/* libraries and CMS integrations. It provides:

  • base64url helpers for JOSE payloads
  • compact JWS parsing into typed header/payload/signature data
  • signing helpers for HS*, RS*, and EdDSA
  • verification helpers for PEM keys, shared secrets, JWKs, and JWKS sets
  • RSA JWK to PEM conversion for public-key verification

The package intentionally leaves token profile validation, claim policy, discovery, key persistence, and HTTP endpoint orchestration to host applications.

Install

composer require aetah/jose

Quick Start

<?php

declare(strict_types=1);

use Aetah\JOSE\JOSE;

$jose = new JOSE();

$jwt = $jose->sign(
    claims: ['sub' => '123', 'iss' => 'https://issuer.example'],
    algorithm: 'HS256',
    privateKey: 'shared-secret',
    kid: 'sig-1'
);

$parsed = $jose->verifyWithKey($jwt, 'shared-secret');

Spec

Spec Status

Missing/out of scope:

  • JWE encryption and decryption
  • X.509 certificate chain processing
  • remote JWKS retrieval and caching
  • OAuth or OpenID Connect claim validation profiles
  • detached payload and general JSON serialization handling

Quality Checks

Run Static Analysis

composer analyse

Run Tests

composer test

Generated artifacts are written under build/:

  • build/phpunit/ for JUnit reports
  • build/coverage/ for coverage output

Clean Build Artifacts

composer clean

Run Test Coverage

composer test:coverage

Run Style Checks

composer lint

Fix Style Checks

composer lint:fix

License

Licensed under AGPL-3.0-or-later. See LICENSE for details.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: AGPL-3.0-or-later
  • 更新时间: 2026-06-21