Files
Authenticator/api/Authenticator.api
cialloo 20833b3bde
All checks were successful
CI - Build and Push / Build and Push Docker Image (push) Successful in 4s
fix: Update PingResp field to use proper capitalization for JSON serialization
2025-10-25 12:10:34 +08:00

65 lines
1.6 KiB
Plaintext

syntax = "v1"
info (
title: "Authenticator API"
desc: "Authenticator API"
author: "cialloo"
date: "2025-10-07"
version: "v1"
)
type (
PingReq {}
PingResp {
OK bool `json:"ok"`
}
)
type (
SteamLoginInitReq {}
// No response needed - endpoint will redirect directly
)
type (
SteamLoginCallbackReq {
OpenidMode string `form:"openid.mode"`
OpenidNs string `form:"openid.ns"`
OpenidOpEndpoint string `form:"openid.op_endpoint"`
OpenidClaimedId string `form:"openid.claimed_id"`
OpenidIdentity string `form:"openid.identity"`
OpenidReturnTo string `form:"openid.return_to"`
OpenidResponseNonce string `form:"openid.response_nonce"`
OpenidAssocHandle string `form:"openid.assoc_handle"`
OpenidSigned string `form:"openid.signed"`
OpenidSig string `form:"openid.sig"`
}
// No response needed - endpoint will redirect to frontend
)
@server (
prefix: /api/authenticator
)
service Authenticator {
@doc (
summary: "Ping the server to check if it's alive"
description: "Ping the server to check if it's alive"
)
@handler pingHandler
get /ping (PingReq) returns (PingResp)
@doc (
summary: "Initiate Steam login"
description: "Redirects user to Steam OpenID login page with nonce for security"
)
@handler steamLoginInitHandler
get /steam/login (SteamLoginInitReq)
@doc (
summary: "Steam login callback"
description: "Validates Steam authentication and redirects to frontend with status"
)
@handler steamLoginCallbackHandler
get /steam/callback (SteamLoginCallbackReq)
}