File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,13 @@ function Get-AuthHeader()
44
55 if (! (Test-GoogleAccessToken $BloggerSession.AccessToken ))
66 {
7- $token = Update-GoogleAccessToken - refreshToken $BloggerSession.RefreshToken
7+ $credentialCache = Get-CredentialCache
8+ $updateArgs = @ {
9+ clientId = $credentialCache.client_id
10+ clientSecret = $credentialCache.client_secret
11+ refreshToken = $BloggerSession.RefreshToken
12+ }
13+ $token = Update-GoogleAccessToken @updateArgs
814 Update-CredentialCache - token $token
915 }
1016
Original file line number Diff line number Diff line change @@ -4,11 +4,11 @@ function Get-GoogleAccessToken
44 [Parameter (Mandatory = $true )]
55 [string ]$code ,
66
7- [Parameter ()]
8- [string ]$clientId = " 284606892422-ribvo7oodlbtd70e8onn8rg4hm58mluj.apps.googleusercontent.com " ,
7+ [Parameter (Mandatory = $true )]
8+ [string ]$clientId ,
99
10- [Parameter ()]
11- [string ]$clientSecret = " PUK0j9ig-GHcSByQao2i1aIa " ,
10+ [Parameter (Mandatory = $true )]
11+ [string ]$clientSecret ,
1212
1313 [Parameter ()]
1414 [string ]$redirectUri = " http://localhost/oauth2callback"
@@ -39,10 +39,10 @@ function Update-GoogleAccessToken
3939{
4040 param (
4141 [Parameter ()]
42- [string ]$clientId = " 284606892422-ribvo7oodlbtd70e8onn8rg4hm58mluj.apps.googleusercontent.com " ,
42+ [string ]$clientId ,
4343
4444 [Parameter ()]
45- [string ]$clientSecret = " PUK0j9ig-GHcSByQao2i1aIa " ,
45+ [string ]$clientSecret ,
4646
4747 [Parameter ()]
4848 [string ]$refreshToken
You can’t perform that action at this time.
0 commit comments