diff --git a/go.mod b/go.mod index c252fdc..23b08a7 100644 --- a/go.mod +++ b/go.mod @@ -11,6 +11,7 @@ require ( github.com/gin-gonic/gin v1.9.1 github.com/google/gopacket v1.1.19 github.com/google/uuid v1.3.0 + github.com/pkg/errors v0.9.1 github.com/sirupsen/logrus v1.8.1 github.com/stretchr/testify v1.8.3 github.com/urfave/cli v1.22.5 @@ -39,7 +40,6 @@ require ( github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect github.com/modern-go/reflect2 v1.0.2 // indirect github.com/pelletier/go-toml/v2 v2.0.8 // indirect - github.com/pkg/errors v0.9.1 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect github.com/russross/blackfriday/v2 v2.0.1 // indirect github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect diff --git a/internal/context/context.go b/internal/context/context.go index 347222b..cafb81b 100644 --- a/internal/context/context.go +++ b/internal/context/context.go @@ -104,7 +104,6 @@ func Init() { InitAusfContext(&ausfContext) } - type NFContext interface { AuthorizationCheck(token, serviceName string) error } @@ -185,4 +184,4 @@ func (c *AUSFContext) AuthorizationCheck(token, serviceName string) error { logger.UtilLog.Debugf("AUSFContext::AuthorizationCheck: token[%s] serviceName[%s]\n", token, serviceName) return oauth.VerifyOAuth(token, serviceName, c.NrfCertPem) -} \ No newline at end of file +} diff --git a/internal/logger/logger.go b/internal/logger/logger.go index b2d3ce3..90993e0 100644 --- a/internal/logger/logger.go +++ b/internal/logger/logger.go @@ -18,7 +18,7 @@ var ( UeAuthLog *logrus.Entry Auth5gAkaLog *logrus.Entry AuthELog *logrus.Entry - UtilLog *logrus.Entry + UtilLog *logrus.Entry ) func init() { diff --git a/internal/sbi/consumer/nf_management.go b/internal/sbi/consumer/nf_management.go index 3d3d6e3..5f3e8d4 100644 --- a/internal/sbi/consumer/nf_management.go +++ b/internal/sbi/consumer/nf_management.go @@ -1,7 +1,6 @@ package consumer import ( - "fmt" "net/http" "strings" diff --git a/internal/sbi/producer/functions.go b/internal/sbi/producer/functions.go index 59498a1..35d5a2c 100644 --- a/internal/sbi/producer/functions.go +++ b/internal/sbi/producer/functions.go @@ -1,7 +1,6 @@ package producer import ( - "crypto/hmac" "crypto/sha256" "encoding/base64" diff --git a/internal/sbi/producer/ue_authentication.go b/internal/sbi/producer/ue_authentication.go index dd2a01c..36831f1 100644 --- a/internal/sbi/producer/ue_authentication.go +++ b/internal/sbi/producer/ue_authentication.go @@ -2,7 +2,6 @@ package producer import ( "bytes" - "crypto/sha256" "encoding/base64" "encoding/hex" diff --git a/internal/sbi/sorprotection/routers.go b/internal/sbi/sorprotection/routers.go index 18640b9..a62cf6d 100644 --- a/internal/sbi/sorprotection/routers.go +++ b/internal/sbi/sorprotection/routers.go @@ -12,7 +12,7 @@ package sorprotection import ( "net/http" "strings" - + "github.com/gin-gonic/gin" ausf_context "github.com/free5gc/ausf/internal/context" diff --git a/internal/util/router_auth_check.go b/internal/util/router_auth_check.go index 88ea59a..37c571b 100644 --- a/internal/util/router_auth_check.go +++ b/internal/util/router_auth_check.go @@ -5,7 +5,7 @@ import ( "github.com/gin-gonic/gin" -ausf_context "github.com/free5gc/ausf/internal/context" + ausf_context "github.com/free5gc/ausf/internal/context" "github.com/free5gc/ausf/internal/logger" ) @@ -30,4 +30,4 @@ func (rac *RouterAuthorizationCheck) Check(c *gin.Context, ausfContext ausf_cont } logger.UtilLog.Debugf("RouterAuthorizationCheck: Check Authorized") -} \ No newline at end of file +} diff --git a/internal/util/router_auth_check_test.go b/internal/util/router_auth_check_test.go index bc0de90..cd98841 100644 --- a/internal/util/router_auth_check_test.go +++ b/internal/util/router_auth_check_test.go @@ -88,4 +88,4 @@ func TestRouterAuthorizationCheck_Check(t *testing.T) { } }) } -} \ No newline at end of file +}