sebastiancx/webauthn 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

sebastiancx/webauthn

最新稳定版本:v0.0.1

Composer 安装命令:

composer require sebastiancx/webauthn

包简介

Web Authentication API server for PHP

README 文档

README

Scrutinizer Code Quality Code Coverage Build Status License: MIT

Current state

Pretty stable but the API may still change slightly until the 1.0 release.

Goal

This library aims to implement the relying party server of the WebAuthn specification in PHP. Important goals are:

  • Implement the level 1 WebAuthn specification
  • Good quality, secure and maintainable code
  • Easy to use for the end-user

Installation

Installation via composer:

composer require sebastiancx/webauthn

Supported features

  • PHP 8.1

  • FIDO conformant library
  • Attestation types:
    • FIDO U2F
    • Packed
    • TPM
    • Android SafetyNet
    • Android Key
    • Apple
    • None
    • Optional 'unsupported' type to handle future types
  • Metadata service support
  • Validating metadata
  • Extensions:
    • appid

Usage

The library is still in development so documentation is limited. The general pattern to follow is:

  1. Implement CredentialStoreInterface (you will need UserCredential or your own implementation of UserCredentialInterface)
  2. Create an instance of RelyingParty and use the ServerBuilder class to build a server object:
$server = (new ServerBuilder())
    ->setRelyingParty($rp)
    ->setCredentialStore($store)
    ->build();
  1. Use startRegistration/finishRegistration to register credentials. Be sure to store the temporary AttestationContext server side!
  2. and startAuthentication/finishAuthentication to authenticate. Be sure to store the temporary AssertionContext server side!

Resources

WebAuthn specification

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-06-24