java.lang.Object
org.miaixz.bus.auth.metric.jwt.Claims
org.miaixz.bus.auth.metric.jwt.JWTHeader
- All Implemented Interfaces:
Serializable
JWT头部信息
- Since:
- Java 17+
- Author:
- Kimi Liu
- See Also:
-
Field Details
-
ALGORITHM
加密算法,通常为HMAC SHA256(HS256) -
TYPE
声明类型,一般为jwt -
CONTENT_TYPE
内容类型(content type) -
KEY_ID
jwk的ID编号
-
-
Constructor Details
-
JWTHeader
public JWTHeader()
-
-
Method Details
-
setAlgorithm
增加“alg”头信息- Parameters:
algorithm- 算法ID,如HS265- Returns:
- this
-
setType
增加“typ”头信息- Parameters:
type- 类型,如JWT- Returns:
- this
-
setContentType
增加“cty”头信息- Parameters:
contentType- 内容类型- Returns:
- this
-
setKeyId
增加“kid”头信息- Parameters:
keyId- kid- Returns:
- this
-
addHeaders
增加自定义JWT认证头- Parameters:
headerClaims- 头信息- Returns:
- this
-