Skip to content

Commit

Permalink
More
Browse files Browse the repository at this point in the history
  • Loading branch information
elffjs committed Oct 21, 2024
1 parent 144fb0b commit a3cf950
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion internal/auth/auth.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ func NewManufacturerTokenCheck(contractAddr string, identitySvc IdentityService)
return nil, err
}

log.Printf("AD resp %#+v", adResp)

if err := validateHeader(ctx, requiredAddr, adResp.ManufacturerTokenID); err != nil {
return nil, UnauthorizedError{err: err}
}
Expand All @@ -116,7 +118,7 @@ func validateHeader(ctx context.Context, requiredAddr common.Address, tokenID in
}

if strconv.Itoa(tokenID) != claim.TokenID {
log.Printf("device manufacturer token id: %d, JWT token id: %d", tokenID, claim.TokenID)
log.Printf("device manufacturer token id: %d, JWT token id: %s", tokenID, claim.TokenID)
return fmt.Errorf("token id does not match")
}

Expand Down

0 comments on commit a3cf950

Please sign in to comment.