Skip to content

Commit b882c24

Browse files
silent pop token refresh
1 parent 2c6fa1c commit b882c24

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/Authentication/Authentication/Handlers/AuthenticationHandler.cs

+2
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
// ------------------------------------------------------------------------------
44

55

6+
using Azure.Core;
67
using Microsoft.Graph.Authentication;
78
using Microsoft.Graph.PowerShell.Authentication.Core.Utilities;
89
using Microsoft.Graph.PowerShell.Authentication.Extensions;
@@ -109,6 +110,7 @@ private async Task<HttpResponseMessage> SendRetryAsync(HttpResponseMessage httpR
109110
var nonceStart = popChallenge.Parameter.IndexOf("nonce=\"") + "nonce=\"".Length;
110111
var nonceEnd = popChallenge.Parameter.IndexOf('"', nonceStart);
111112
GraphSession.Instance.GraphRequestProofofPossession.ProofofPossessionNonce = popChallenge.Parameter.Substring(nonceStart, nonceEnd - nonceStart);
113+
GraphSession.Instance.GraphRequestProofofPossession.PopTokenContext = new PopTokenRequestContext(GraphSession.Instance.AuthContext.Scopes, isProofOfPossessionEnabled: true, proofOfPossessionNonce: GraphSession.Instance.GraphRequestProofofPossession.ProofofPossessionNonce, request: GraphSession.Instance.GraphRequestProofofPossession.Request);
112114
}
113115

114116
// Authenticate request using auth provider

0 commit comments

Comments
 (0)