GET /oauth/userinfo
OpenID Connect UserInfo 端点。使用 Bearer Token 认证,返回扁平 UserInfo JSON(无 code/message 信封)。当 scope 包含 "profile" 时,从 profile-service 查询用户资料并合并到响应中。当配置了 verification-service 时,额外查询年龄分组/未成年人状态。参考:OpenID Connect Core 1.0 §5.3 (UserInfo Endpoint)。
OAuth None application/json
Request Parameters
| Name | In | Type | Required | Default | Example | Constraints | Description |
Authorization |
header |
string |
Yes |
|
|
|
Bearer <access_token> |
Referenced Schemas
dto.OAuthErrorResponse
OAuth标准错误响应
| Field | Type | Required | Example | Constraints | Description |
error |
string |
No |
invalid_request |
|
错误码 |
error_description |
string |
No |
Missing required parameter |
|
错误描述 |
error_uri |
string |
No |
https://docs.example.com/errors |
|
错误URI |
state |
string |
No |
state-123 |
|
状态 |
dto.OIDCUserInfoResponse
| Field | Type | Required | Example | Constraints | Description |
age_group |
string |
No |
|
|
|
birthdate |
string |
No |
1990-01-15 |
|
|
client_id |
string |
No |
app-123 |
|
Internal |
family_name |
string |
No |
Doe |
|
|
gender |
string |
No |
male |
|
|
given_name |
string |
No |
John |
|
|
is_minor |
boolean |
No |
|
|
Verification (age/minor status) |
locale |
string |
No |
en-US |
|
|
name |
string |
No |
John Doe |
|
OIDC Standard Claims(可选,scope=profile 时填充) |
nickname |
string |
No |
Johnny |
|
|
picture |
string |
No |
https://cdn.example.com/avatars/usr_abc123.jpg |
|
|
preferred_username |
string |
No |
john |
|
|
scope |
string |
No |
openid profile |
|
|
sub |
string |
No |
usr_abc123 |
|
用户ID(必填) |
updated_at |
integer |
No |
1743728400 |
|
|
website |
string |
No |
https://johndoe.com |
|
|
zoneinfo |
string |
No |
America/Los_Angeles |
|
|