Merge pull request #112 from hxiong388/new-token-uri
Upgrade to new token URI
This commit is contained in:
commit
0dab02dbaa
6 files changed
+8
-8
No files matched your search
@@ -137,7 +137,7 @@ describe Google::Auth::ServiceAccountCredentials do
|
||||
_claim, _header = JWT.decode(params.assoc('assertion').last,
|
||||
@key.public_key)
|
||||
end
|
||||
stub_request(:post, 'https://www.googleapis.com/oauth2/v3/token')
|
||||
stub_request(:post, 'https://www.googleapis.com/oauth2/v4/token')
|
||||
.with(body: hash_including(
|
||||
'grant_type' => 'urn:ietf:params:oauth:grant-type:jwt-bearer'
|
||||
),
|
||||
|
||||
@@ -242,7 +242,7 @@ describe Google::Auth::UserAuthorizer do
|
||||
end
|
||||
|
||||
before(:example) do
|
||||
stub_request(:post, 'https://www.googleapis.com/oauth2/v3/token')
|
||||
stub_request(:post, 'https://www.googleapis.com/oauth2/v4/token')
|
||||
.to_return(body: token_json, status: 200, headers: {
|
||||
'Content-Type' => 'application/json'
|
||||
})
|
||||
@@ -270,7 +270,7 @@ describe Google::Auth::UserAuthorizer do
|
||||
|
||||
context 'with invalid authorization code' do
|
||||
before(:example) do
|
||||
stub_request(:post, 'https://www.googleapis.com/oauth2/v3/token')
|
||||
stub_request(:post, 'https://www.googleapis.com/oauth2/v4/token')
|
||||
.to_return(status: 400)
|
||||
end
|
||||
|
||||
|
||||
@@ -68,7 +68,7 @@ describe Google::Auth::UserRefreshCredentials do
|
||||
body = MultiJson.dump('access_token' => access_token,
|
||||
'token_type' => 'Bearer',
|
||||
'expires_in' => 3600)
|
||||
stub_request(:post, 'https://www.googleapis.com/oauth2/v3/token')
|
||||
stub_request(:post, 'https://www.googleapis.com/oauth2/v4/token')
|
||||
.with(body: hash_including('grant_type' => 'refresh_token'))
|
||||
.to_return(body: body,
|
||||
status: 200,
|
||||
|
||||
@@ -107,7 +107,7 @@ describe Google::Auth::WebUserAuthorizer do
|
||||
end
|
||||
|
||||
before(:example) do
|
||||
stub_request(:post, 'https://www.googleapis.com/oauth2/v3/token')
|
||||
stub_request(:post, 'https://www.googleapis.com/oauth2/v4/token')
|
||||
.to_return(body: token_json,
|
||||
status: 200,
|
||||
headers: { 'Content-Type' => 'application/json' })
|
||||
|
||||
Reference in new issue
Block a user