@@ -58,7 +58,7 @@ func TestPKCEOAuthClient(t *testing.T) {
58
58
59
59
require .NoError (t , err )
60
60
assert .NotEmpty (t , resp .CodeVerifier )
61
- assert .Contains (t , resp .AuthorizationURL , "https://api .coze.com/api/permission/oauth2/authorize" )
61
+ assert .Contains (t , resp .AuthorizationURL , "https://www .coze.com/api/permission/oauth2/authorize" )
62
62
assert .Contains (t , resp .AuthorizationURL , "client_id=test_client_id" )
63
63
assert .Contains (t , resp .AuthorizationURL , "redirect_uri=https%3A%2F%2Fexample.com%2Fcallback" )
64
64
assert .Contains (t , resp .AuthorizationURL , "state=test_state" )
@@ -78,7 +78,7 @@ func TestPKCEOAuthClient(t *testing.T) {
78
78
79
79
require .NoError (t , err )
80
80
assert .NotEmpty (t , resp .CodeVerifier )
81
- assert .Contains (t , resp .AuthorizationURL , "https://api .coze.com/api/permission/oauth2/workspace_id/workspace_id/authorize" )
81
+ assert .Contains (t , resp .AuthorizationURL , "https://www .coze.com/api/permission/oauth2/workspace_id/workspace_id/authorize" )
82
82
assert .Contains (t , resp .AuthorizationURL , "client_id=test_client_id" )
83
83
assert .Contains (t , resp .AuthorizationURL , "redirect_uri=https%3A%2F%2Fexample.com%2Fcallback" )
84
84
assert .Contains (t , resp .AuthorizationURL , "state=test_state" )
@@ -117,7 +117,7 @@ func TestDeviceOAuthClient(t *testing.T) {
117
117
expectedResp := & GetDeviceAuthResp {
118
118
DeviceCode : "test_device_code" ,
119
119
UserCode : "test_user_code" ,
120
- VerificationURI : "https://api .coze.com/verify" ,
120
+ VerificationURI : "https://www .coze.com/verify" ,
121
121
ExpiresIn : 1800 ,
122
122
Interval : 5 ,
123
123
}
@@ -134,8 +134,8 @@ func TestDeviceOAuthClient(t *testing.T) {
134
134
require .NoError (t , err )
135
135
assert .Equal (t , "test_device_code" , resp .DeviceCode )
136
136
assert .Equal (t , "test_user_code" , resp .UserCode )
137
- assert .Equal (t , "https://api .coze.com/verify" , resp .VerificationURI )
138
- assert .Equal (t , "https://api .coze.com/verify?user_code=test_user_code" , resp .VerificationURL )
137
+ assert .Equal (t , "https://www .coze.com/verify" , resp .VerificationURI )
138
+ assert .Equal (t , "https://www .coze.com/verify?user_code=test_user_code" , resp .VerificationURL )
139
139
})
140
140
141
141
t .Run ("GetAccessToken with polling" , func (t * testing.T ) {
@@ -248,7 +248,7 @@ func TestWebOAuthClient(t *testing.T) {
248
248
RedirectURI : "https://example.com/callback" ,
249
249
State : "test_state" ,
250
250
})
251
- assert .Contains (t , url , "https://api .coze.com/api/permission/oauth2/authorize" )
251
+ assert .Contains (t , url , "https://www .coze.com/api/permission/oauth2/authorize" )
252
252
assert .Contains (t , url , "client_id=test_client_id" )
253
253
assert .Contains (t , url , "redirect_uri=https%3A%2F%2Fexample.com%2Fcallback" )
254
254
assert .Contains (t , url , "state=test_state" )
0 commit comments