Skip to content

Commit

Permalink
generate token containing version key
Browse files Browse the repository at this point in the history
  • Loading branch information
gmgigi96 committed Apr 3, 2023
1 parent 4d6317c commit c7ed45e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/grpc/services/gateway/storageprovider.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ func (s *svc) sign(_ context.Context, target, versionKey string) (string, error)
Audience: "reva",
IssuedAt: time.Now().Unix(),
},
Target: target,
Target: target,
VersionKey: versionKey,
}

t := jwt.NewWithClaims(jwt.GetSigningMethod("HS256"), claims)
Expand Down Expand Up @@ -475,7 +476,7 @@ func versionKey(req *provider.InitiateFileDownloadRequest) string {
if req.Opaque == nil || req.Opaque.Map == nil {
return ""
}
val := req.Opaque.Map["versionKey"]
val := req.Opaque.Map["version_key"]
if val == nil {
return ""
}
Expand Down

0 comments on commit c7ed45e

Please sign in to comment.