func IsAuthenticated() gin.HandlerFunc {
	return func(c *gin.Context) {
		fmt.Println(c.GetHeader("Authorization"))

		if c.GetHeader("Authorization") == fmt.Sprintf("Bearer %s", getAuthToken()) {
			c.Next()
		} else {
			c.JSON(http.StatusUnauthorized, gin.H{"status": "unauthorized"})
		}
	}
}
func IsAuthenticated() gin.HandlerFunc {
	return func(c *gin.Context) {
		fmt.Println(c.GetHeader("Authorization"))

		if c.GetHeader("Authorization") == fmt.Sprintf("Bearer %s", getAuthToken()) {
			c.Next()
		} else {
			c.JSON(http.StatusUnauthorized, gin.H{"status": "unauthorized"})
		}
	}
}
func IsAuthenticated ( ) gin . HandlerFunc { return func ( c * gin . Context ) { fmt . Println ( c . GetHeader ( " " ) ) if c . GetHeader ( " " ) == fmt . Sprintf ( " " , getAuthToken ( ) ) { c . Next ( ) } else { c . JSON ( http . StatusUnauthorized , gin . H { " " : " " } ) } } }
// Simple authentication middleware
Simple authentication middleware