MCPcopy Create free account
hub / github.com/devinterface/startersaas-go-api / SsoLogin

Method SsoLogin

endpoints/auth.endpoint.go:36–53  ·  view source on GitHub ↗

SsoLogin function

(ctx *fiber.Ctx)

Source from the content-addressed store, hash-verified

34
35// SsoLogin function
36func (authEndpoint *AuthEndpoint) SsoLogin(ctx *fiber.Ctx) error {
37 var inputMap = make(map[string]interface{})
38 ctx.BodyParser(&inputMap)
39 v := validate.Map(inputMap)
40 v.StringRule("sso", "required")
41
42 if !v.Validate() {
43 return ctx.Status(422).JSON(v.Errors)
44 }
45 response, err := authService.Sso(inputMap["sso"].(string))
46 if err != nil {
47 return ctx.Status(401).JSON(fiber.Map{
48 "message": err.Error(),
49 })
50
51 }
52 return ctx.JSON(response)
53}
54
55// Signup function
56func (authEndpoint *AuthEndpoint) Signup(ctx *fiber.Ctx) error {

Callers

nothing calls this directly

Calls 1

SsoMethod · 0.80

Tested by

no test coverage detected