Skip to content

Commit

Permalink
add details on UT
Browse files Browse the repository at this point in the history
Signed-off-by: Julien Stroheker <juliens@microsoft.com>
  • Loading branch information
julienstroheker committed Jun 14, 2023
1 parent c0dab3e commit 19be0ef
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions auth/providers/azure/pop_tokenverifier_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ func TestPopTokenVerifier_Verify(t *testing.T) {
_, err := verifier.ValidatePopToken(validToken)
assert.NoError(t, err)

// Test for replay attack
validToken, _ = GeneratePoPToken(time.Now().Unix(), "testHostname", "", "randomnonce")
_, err = verifier.ValidatePopToken(validToken)
assert.EqualError(t, err, "Invalid token. 'nonce' claim is reused")
Expand Down

0 comments on commit 19be0ef

Please sign in to comment.