File tree Expand file tree Collapse file tree 4 files changed +5
-10
lines changed Expand file tree Collapse file tree 4 files changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ require (
12
12
github.com/spf13/cobra v1.7.0
13
13
github.com/stretchr/testify v1.8.4
14
14
github.com/tidwall/pretty v1.2.1
15
- gitlab.snapp.ir/security_regulatory/validator/pkg/sdk v0.2.2
16
15
go.opentelemetry.io/otel v1.19.0
17
16
go.opentelemetry.io/otel/exporters/jaeger v1.17.0
18
17
go.opentelemetry.io/otel/sdk v1.19.0
Original file line number Diff line number Diff line change 1
1
cloud.google.com/go v0.26.0 /go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw =
2
2
cloud.google.com/go v0.34.0 /go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw =
3
3
github.com/BurntSushi/toml v0.3.1 /go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU =
4
- github.com/agiledragon/gomonkey/v2 v2.10.1 h1:FPJJNykD1957cZlGhr9X0zjr291/lbazoZ/dmc4mS4c =
5
4
github.com/alecthomas/template v0.0.0-20160405071501-a0175ee3bccc /go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc =
6
5
github.com/alecthomas/template v0.0.0-20190718012654-fb15b899a751 /go.mod h1:LOuyumcjzFXgccqObfd/Ljyb9UuFJ6TxHnclSeseNhc =
7
6
github.com/alecthomas/units v0.0.0-20151022065526-2efee857e7cf /go.mod h1:ybxpYRFXyAe+OPACYpWeL0wqObRcbAqCMya13uyzqw0 =
@@ -301,8 +300,6 @@ github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7Fw
301
300
github.com/yuin/goldmark v1.1.27 /go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74 =
302
301
github.com/yuin/goldmark v1.2.1 /go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74 =
303
302
github.com/yuin/goldmark v1.3.5 /go.mod h1:mwnBkeHKe2W/ZEtQ+71ViKU8L12m81fl3OWwC1Zlc8k =
304
- gitlab.snapp.ir/security_regulatory/validator/pkg/sdk v0.2.2 h1:+JwjrfGwsdgojbfn26M4Af/ZzBHCsLyU9vNYWXe1HnM =
305
- gitlab.snapp.ir/security_regulatory/validator/pkg/sdk v0.2.2 /go.mod h1:+0JXkekQpl5kJvmIKyBH5EJLIj0u628fbk+GfaIS+3k =
306
303
go.etcd.io/etcd/api/v3 v3.5.4 /go.mod h1:5GB2vv4A4AOn3yk7MftYGHkUfGtDHnEraIjym4dYz5A =
307
304
go.etcd.io/etcd/client/pkg/v3 v3.5.4 /go.mod h1:IJHfcCEKxYu1Os13ZdwCwIUTUVGYTSAM3YSwc9/Ac1g =
308
305
go.etcd.io/etcd/client/v3 v3.5.4 /go.mod h1:ZaRkVgBZC+L+dLCjTcF1hRXpgZXQPOvnA/Ak/gq3kiY =
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ import (
10
10
"github.com/snapp-incubator/soteria/internal/topics"
11
11
"github.com/snapp-incubator/soteria/pkg/acl"
12
12
"github.com/snapp-incubator/soteria/pkg/validator"
13
- validatorSDK "gitlab.snapp.ir/security_regulatory/validator/pkg/sdk"
14
13
)
15
14
16
15
// AutoAuthenticator is responsible for Acl/Auth/Token of users.
@@ -19,14 +18,14 @@ type AutoAuthenticator struct {
19
18
TopicManager * topics.Manager
20
19
Company string
21
20
JwtConfig config.Jwt
22
- Validator validatorSDK .Client
21
+ Validator validator .Client
23
22
Parser * jwt.Parser
24
23
}
25
24
26
25
// Auth check user authentication by checking the user's token
27
26
// isSuperuser is a flag that authenticator set it true when credentials is related to a superuser.
28
27
func (a AutoAuthenticator ) Auth (tokenString string ) error {
29
- if _ , err := a .Validator .Validate (context .Background (), & http.Header {
28
+ if _ , err := a .Validator .Validate (context .Background (), http.Header {
30
29
validator .ServiceNameHeader : []string {"soteria" },
31
30
"user-agent" : []string {},
32
31
"X-APP-Version-Code" : []string {"" },
Original file line number Diff line number Diff line change 7
7
"github.com/snapp-incubator/soteria/internal/config"
8
8
"github.com/snapp-incubator/soteria/internal/topics"
9
9
"github.com/snapp-incubator/soteria/pkg/acl"
10
- validatorSDK "gitlab. snapp.ir/security_regulatory/validator/ pkg/sdk "
10
+ "github.com/ snapp-incubator/soteria/ pkg/validator "
11
11
"go.uber.org/zap"
12
12
)
13
13
@@ -30,7 +30,7 @@ func (b Builder) Authenticators() map[string]Authenticator {
30
30
b .Logger .Fatal ("cannot create hash-id manager" , zap .Error (err ))
31
31
}
32
32
33
- validatorClient := validatorSDK .New (b .ValidatorConfig .URL , b .ValidatorConfig .Timeout )
33
+ client := validator .New (b .ValidatorConfig .URL , b .ValidatorConfig .Timeout )
34
34
35
35
var auth Authenticator
36
36
@@ -47,7 +47,7 @@ func (b Builder) Authenticators() map[string]Authenticator {
47
47
b .Logger .Named ("topic-manager" ),
48
48
),
49
49
JwtConfig : vendor .Jwt ,
50
- Validator : validatorClient ,
50
+ Validator : client ,
51
51
Parser : jwt .NewParser (),
52
52
}
53
53
} else {
You can’t perform that action at this time.
0 commit comments