AdminLogin delegates to service.AdminLogin and lifts the admin session cookie side-effect onto the outgoing stream (grpc-gateway promotes it to Set-Cookie for REST callers). Public entry point — does not require an existing session.
(ctx context.Context, req *authorizerv1.AdminLoginRequest)
| 27 | // side-effect onto the outgoing stream (grpc-gateway promotes it to Set-Cookie |
| 28 | // for REST callers). Public entry point — does not require an existing session. |
| 29 | func (h *AdminHandler) AdminLogin(ctx context.Context, req *authorizerv1.AdminLoginRequest) (*authorizerv1.AdminLoginResponse, error) { |
| 30 | res, side, err := h.Service.AdminLogin(ctx, transport.MetaFromGRPC(ctx), &model.AdminLoginRequest{ |
| 31 | AdminSecret: req.AdminSecret, |
| 32 | }) |
| 33 | if err != nil { |
| 34 | return nil, err |
| 35 | } |
| 36 | _ = transport.ApplyToGRPC(ctx, side) |
| 37 | return &authorizerv1.AdminLoginResponse{Message: res.Message}, nil |
| 38 | } |
| 39 | |
| 40 | // AdminLogout delegates to service.AdminLogout and applies the cookie-clearing |
| 41 | // side-effect. Requires super-admin auth. |
nothing calls this directly
no test coverage detected