Some checks failed
CI - Build and Push / Build and Push Docker Image (push) Failing after 32s
- Added SteamLoginInitLogic to handle the initiation of Steam login. - Created service context for managing configuration and Redis connection. - Defined types for Steam login requests and callbacks. - Implemented utility functions for building OpenID query strings and validating responses from Steam. - Updated go.mod and go.sum to include necessary dependencies. - Modified GenApi.ps1 script to generate code in the correct directory.
39 lines
800 B
Go
39 lines
800 B
Go
// Code generated by goctl. DO NOT EDIT.
|
|
// goctl 1.8.4
|
|
|
|
package handler
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"git.cialloo.com/CiallooWeb/Authenticator/app/internal/svc"
|
|
|
|
"github.com/zeromicro/go-zero/rest"
|
|
)
|
|
|
|
func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
|
|
server.AddRoutes(
|
|
[]rest.Route{
|
|
{
|
|
// Ping the server to check if it's alive
|
|
Method: http.MethodGet,
|
|
Path: "/ping",
|
|
Handler: pingHandler(serverCtx),
|
|
},
|
|
{
|
|
// Steam login callback
|
|
Method: http.MethodGet,
|
|
Path: "/steam/callback",
|
|
Handler: steamLoginCallbackHandler(serverCtx),
|
|
},
|
|
{
|
|
// Initiate Steam login
|
|
Method: http.MethodGet,
|
|
Path: "/steam/login",
|
|
Handler: steamLoginInitHandler(serverCtx),
|
|
},
|
|
},
|
|
rest.WithPrefix("/api/authenticator"),
|
|
)
|
|
}
|