Files
Authenticator/api/Authenticator.api
cialloo 3e90db888d
Some checks failed
CI - Build and Push / Build and Push Docker Image (push) Failing after 15s
Implement Steam login functionality with OpenID integration
2025-10-07 17:43:22 +08:00

66 lines
1.7 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"`
}
// Steam Login Types
SteamLoginInitReq {}
SteamLoginInitResp {
RedirectUrl string `json:"redirectUrl"`
}
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"`
}
SteamLoginCallbackResp {
Success bool `json:"success"`
SteamId string `json:"steamId,omitempty"`
Message string `json:"message,omitempty"`
}
)
@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"
)
@handler steamLoginInitHandler
get /steam/login (SteamLoginInitReq) returns (SteamLoginInitResp)
@doc (
summary: "Steam login callback"
description: "Handles the callback from Steam after user authentication"
)
@handler steamLoginCallbackHandler
get /steam/callback (SteamLoginCallbackReq) returns (SteamLoginCallbackResp)
}