Class AuthnHttpEndpoint
java.lang.Object
io.github.xezzon.zeroweb.auth.internal.AuthnHttpEndpoint
认证
- Author:
- xezzon
-
Constructor Summary
ConstructorsConstructorDescriptionAuthnHttpEndpoint(AuthnService authnService, io.github.xezzon.zeroweb.common.config.ZerowebConfig zerowebConfig) 构造函数,注入AuthnService和ZerowebConfig。 -
Method Summary
Modifier and TypeMethodDescriptionbasicLogin(@Valid BasicAuth basicAuth) 通过用户名和密码进行基本认证登录。getSsoToken(jakarta.servlet.http.HttpServletResponse response) 获取当前用户的 SSO 令牌。org.springframework.http.ResponseEntity<byte @NonNull []> self()获取当前用户的认证信息。
-
Constructor Details
-
AuthnHttpEndpoint
public AuthnHttpEndpoint(AuthnService authnService, io.github.xezzon.zeroweb.common.config.ZerowebConfig zerowebConfig) 构造函数,注入AuthnService和ZerowebConfig。- Parameters:
authnService- 认证服务实例。zerowebConfig- ZeroWeb 配置实例。
-
-
Method Details
-
basicLogin
-
self
@GetMapping("/self") public org.springframework.http.ResponseEntity<byte @NonNull []> self() throws com.google.protobuf.InvalidProtocolBufferException获取当前用户的认证信息。
如果用户未登录,返回 204 No Content。
- Returns:
- 包含用户认证信息(JWT)的
ResponseEntity。 - Throws:
com.google.protobuf.InvalidProtocolBufferException- 如果 JWT Claim 无法正确序列化。
-
getSsoToken
-