From 95dfc551f7eaaf6e8ebdefce1b733951354ac40d Mon Sep 17 00:00:00 2001 From: Vidhu Kant Sharma Date: Sun, 3 Sep 2023 15:00:03 +0530 Subject: added JWT authorization middleware --- errors/errors.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'errors/errors.go') diff --git a/errors/errors.go b/errors/errors.go index 1cae027..16e1646 100644 --- a/errors/errors.go +++ b/errors/errors.go @@ -23,7 +23,7 @@ import ( var ( // 204 - ErrEmptyResponse = errors.New("No Records Found") + ErrEmptyResponse = errors.New("No Records Found") // 400 ErrNoWhereCondition = errors.New("No Where Condition") @@ -38,6 +38,9 @@ var ( // 401 ErrWrongPassword = errors.New("Wrong Password") + ErrInvalidAuthHeader = errors.New("Invalid Authorization Header") + ErrUnauthorized = errors.New("Unauthorized") + ErrSessionExpired = errors.New("Session Expired") // 404 ErrNotFound = errors.New("Not Found") -- cgit v1.2.3