Implement Steam login functionality with OpenID integration
Some checks failed
CI - Build and Push / Build and Push Docker Image (push) Failing after 15s
Some checks failed
CI - Build and Push / Build and Push Docker Image (push) Failing after 15s
This commit is contained in:
@@ -13,6 +13,28 @@ type (
|
||||
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 (
|
||||
@@ -25,5 +47,19 @@ service Authenticator {
|
||||
)
|
||||
@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)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user