Skip to content

Commit

Permalink
fix: crrect strconv import
Browse files Browse the repository at this point in the history
  • Loading branch information
1995parham committed Nov 30, 2024
1 parent 6ebc162 commit 5f66882
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions internal/authenticator/auto_authenticator.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/snapp-incubator/soteria/internal/metric"
"github.com/snapp-incubator/soteria/internal/topics"
"github.com/snapp-incubator/soteria/pkg/acl"
"github.com/snapp-incubator/soteria/pkg/strconv"
"github.com/snapp-incubator/soteria/pkg/validator"
"go.opentelemetry.io/otel"
"go.opentelemetry.io/otel/propagation"
Expand Down Expand Up @@ -82,13 +83,13 @@ func (a AutoAuthenticator) ACL(
return false, ErrIssNotFound
}

issuer := fmt.Sprintf("%v", claims[a.JWTConfig.IssName])
issuer := strconv.ToString(claims[a.JWTConfig.IssName])

if claims[a.JWTConfig.SubName] == nil {
return false, ErrSubNotFound
}

sub := fmt.Sprintf("%v", claims[a.JWTConfig.SubName])
sub := strconv.ToString(claims[a.JWTConfig.SubName])

topicTemplate := a.TopicManager.ParseTopic(topic, issuer, sub, map[string]any(claims))
if topicTemplate == nil {
Expand Down
2 changes: 1 addition & 1 deletion internal/authenticator/manual_authenticator.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ import (
"fmt"

"github.com/golang-jwt/jwt/v5"
"github.com/hashicorp/hcl/hcl/strconv"
"github.com/snapp-incubator/soteria/internal/config"
"github.com/snapp-incubator/soteria/internal/topics"
"github.com/snapp-incubator/soteria/pkg/acl"
"github.com/snapp-incubator/soteria/pkg/strconv"
)

// ManualAuthenticator is responsible for Acl/Auth/Token of users without calling
Expand Down

0 comments on commit 5f66882

Please sign in to comment.