This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controller | |
import ( | |
"bmacharia/jwt-go-rbac/model" | |
"errors" | |
"net/http" | |
"strconv" | |
"github.com/gin-gonic/gin" | |
"gorm.io/gorm" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package controller | |
import ( | |
"bmacharia/jwt-go-rbac/model" | |
"errors" | |
"fmt" | |
"net/http" | |
"strconv" | |
"github.com/gin-gonic/gin" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package util | |
import ( | |
"bmacharia/jwt-go-rbac/model" | |
"errors" | |
"fmt" | |
"os" | |
"strconv" | |
"strings" | |
"time" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package util | |
import ( | |
"net/http" | |
"github.com/gin-gonic/gin" | |
) | |
// check for valid admin token | |
func JWTAuth() gin.HandlerFunc { |
OlderNewer