Skip to content

Commit

Permalink
fix after master rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
daeMOn63 committed Nov 25, 2020
1 parent 65b7c3e commit c8b6b62
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions cookbook/signedbiscuit/biscuit.go
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ func WithSignatureVerification(v biscuit.Verifier, audience string, audienceKey
return nil, nil, fmt.Errorf("biscuit: failed to retrieve user signature data: %w", err)
}

signatureBlockID, err := v.GetBlockID(biscuit.Fact{Predicate: biscuit.Predicate{
signatureBlockID, err := v.Biscuit().GetBlockID(biscuit.Fact{Predicate: biscuit.Predicate{
Name: "signature",
IDs: []biscuit.Atom{
userVerificationData.DataID,
Expand All @@ -163,7 +163,7 @@ func WithSignatureVerification(v biscuit.Verifier, audience string, audienceKey
return nil, nil, fmt.Errorf("biscuit: failed to retrieve signature blockID: %w", err)
}

signedTokenHash, err := v.SHA256Sum(signatureBlockID - 1)
signedTokenHash, err := v.Biscuit().SHA256Sum(signatureBlockID - 1)
if err != nil {
return nil, nil, fmt.Errorf("biscuit: failed to generate token hash: %w", err)
}
Expand Down
2 changes: 1 addition & 1 deletion cookbook/signedbiscuit/biscuit_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func TestBiscuit(t *testing.T) {
IssueTime: time.Now(),
}

builder := biscuit.NewBuilder(rand.Reader, rootKey)
builder := biscuit.NewBuilder(rootKey)

builder, err = WithSignableFacts(builder, audience, audienceKey, userKey.Public, time.Now().Add(5*time.Minute), metas)
require.NoError(t, err)
Expand Down

0 comments on commit c8b6b62

Please sign in to comment.