Skip to content

Commit

Permalink
- Updated the go.mod module to ss3mm
Browse files Browse the repository at this point in the history
- Fixed vulnerabilities on gin-gonic and jwt packages
  • Loading branch information
sammobach committed Jan 8, 2022
1 parent 97b012c commit e92d626
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package main

import (
"github.com/gin-gonic/gin"
"github.com/nilpntr/ginsec"
"github.com/ss3mm/ginsec"
"log"
"time"
)
Expand Down
8 changes: 3 additions & 5 deletions ginsec.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,17 @@ package ginsec

import (
"errors"
"github.com/dgrijalva/jwt-go"
"github.com/gin-gonic/gin"
"github.com/golang-jwt/jwt/v4"
"net/http"
"strings"
"time"
)

// Default user claims
// MapClaims Default user claims
type MapClaims map[string]interface{}

// The Gin-JWT-Go middleware
// GinJWTMiddleware The Gin-JWT-Go middleware
type GinJWTMiddleware struct {
// Realm name of the realm. Required.
Realm string
Expand Down Expand Up @@ -64,7 +64,6 @@ type GinJWTMiddleware struct {
const (
SigningAlgorithm = "HS256"
TokenHeadName = "Bearer"
AuthHeaderName = "Authorization"
)

// Errors
Expand All @@ -78,7 +77,6 @@ var (
ErrMissingExpField = errors.New("missing exp field")
ErrWrongFormatOfExp = errors.New("wrong exp field format")
ErrExpiredToken = errors.New("token expired")
ErrForbidden = errors.New("you don't have permission to access this resource")
ErrClaimsIncorrect = errors.New("you're claims are incorrect")
)

Expand Down
8 changes: 4 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
module github.com/nilpntr/ginsec
module github.com/ss3mm/ginsec

go 1.14
go 1.16

require (
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/gin-gonic/gin v1.6.3
github.com/gin-gonic/gin v1.7.7
github.com/golang-jwt/jwt/v4 v4.2.0
)

0 comments on commit e92d626

Please sign in to comment.