diff options
author | terminaldweller <devi@terminaldweller.com> | 2024-01-28 02:25:16 +0000 |
---|---|---|
committer | terminaldweller <devi@terminaldweller.com> | 2024-01-28 02:25:16 +0000 |
commit | cf93fe1d26fdf7cf158dbee36133651cc5c050b3 (patch) | |
tree | f303097c66d19c8cbffc37e866e543e1d37e4118 | |
parent | added basic http auth (diff) | |
download | sms-webhook-cf93fe1d26fdf7cf158dbee36133651cc5c050b3.tar.gz sms-webhook-cf93fe1d26fdf7cf158dbee36133651cc5c050b3.zip |
added basic http auth
-rw-r--r-- | main.go | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -54,11 +54,13 @@ func (hw handlerWrapper) postHandler(context echo.Context) error { if !ok { return context.JSON(http.StatusUnauthorized, "unauthorized") } + log.Println(user, pass) userRecord, err := hw.app.Dao().FindAuthRecordByUsername("users", user) if err != nil { return context.JSON(http.StatusUnauthorized, "unauthorized") } + log.Println(userRecord.Get("password")) if userRecord.Get("password") != pass { return context.JSON(http.StatusUnauthorized, "unauthorized") |