mirror of
http://124.126.16.154:8888/singularity/HyperfDevelopmentKitCore.git
synced 2026-01-15 06:15:10 +08:00
feat(constant): 增加http头authentication的枚举类型
This commit is contained in:
72
src/Constants/HttpAuthenticationType.php
Normal file
72
src/Constants/HttpAuthenticationType.php
Normal file
@@ -0,0 +1,72 @@
|
||||
<?php
|
||||
|
||||
declare (strict_types=1);
|
||||
namespace Singularity\HDK\Core\Constants;
|
||||
|
||||
use Hyperf\Constants\AbstractConstants;
|
||||
use Hyperf\Constants\Annotation\Constants;
|
||||
use Lmc\HttpConstants\Header;
|
||||
|
||||
#[Constants]
|
||||
class HttpAuthenticationType extends AbstractConstants
|
||||
{
|
||||
/**
|
||||
* base64-encoded credentials. More information below.
|
||||
*
|
||||
* @link https://datatracker.ietf.org/doc/html/rfc7617 RFC 7617
|
||||
*/
|
||||
public const BASIC = 'Basic';
|
||||
/**
|
||||
* bearer tokens to access OAuth 2.0-protected resources
|
||||
*
|
||||
* @link https://datatracker.ietf.org/doc/html/rfc6750 RFC 6750
|
||||
*/
|
||||
public const Bearer = 'Bearer';
|
||||
/**
|
||||
* HTTP Digest Access Authentication
|
||||
*
|
||||
* @note Firefox 93 and later support SHA-256 encryption.
|
||||
* Previous versions only support MD5 hashing (not recommended).
|
||||
*
|
||||
* @link https://datatracker.ietf.org/doc/html/rfc7616 RFC 7616
|
||||
*/
|
||||
public const DIGEST = Header::DIGEST;
|
||||
/**
|
||||
* HTTP Origin-Bound Authentication, digital-signature-based
|
||||
*
|
||||
* @link https://datatracker.ietf.org/doc/html/rfc7486 RFC 7486,Section 3
|
||||
*/
|
||||
public const HOBA = 'HOBA';
|
||||
/**
|
||||
* @link https://datatracker.ietf.org/doc/html/rfc8120 RFC 8120
|
||||
*/
|
||||
public const MUTUAL = 'Mutual';
|
||||
/**
|
||||
* @link https://www.ietf.org/rfc/rfc4559.txt RFC 4559
|
||||
*/
|
||||
public const NEGOTIATE_NTLM = 'Negotiate';
|
||||
/**
|
||||
* Voluntary Application Server Identification (VAPID) for Web Push
|
||||
*
|
||||
* @link https://datatracker.ietf.org/doc/html/rfc8292 RFC 8292
|
||||
*/
|
||||
public const VAPID = 'vapid';
|
||||
/**
|
||||
* Salted Challenge Response HTTP Authentication Mechanism
|
||||
*
|
||||
* @link https://datatracker.ietf.org/doc/html/rfc7804 RFC 7804
|
||||
*/
|
||||
public const SCRAM_SHA_256 = 'SCRAM-SHA-256';
|
||||
/**
|
||||
* This scheme is used for AWS3 server authentication.
|
||||
*
|
||||
* @link https://docs.aws.amazon.com/AmazonS3/latest/API/sigv4-auth-using-authorization-header.html AWS docs
|
||||
*/
|
||||
public const AWS4_HMAC_SHA256 = 'AWS4-HMAC-SHA256';
|
||||
/**
|
||||
* 国密 SM3
|
||||
*
|
||||
* @see https://sm3.doylee.cn
|
||||
*/
|
||||
public const SCRAM_SM3 = 'SCRAM-SM3';
|
||||
}
|
||||
Reference in New Issue
Block a user