@@ -303,28 +303,28 @@ def deploy(
303303
304304 if auth_method == "oauth2" :
305305 # Get or create the Identity user pool.
306- identity_user_pool_id = self ._veidentity_service .get_user_pool (
306+ identity_user_pool = self ._veidentity_service .get_user_pool (
307307 name = identity_user_pool_name ,
308308 )
309- if not identity_user_pool_id :
310- identity_user_pool_id = self ._veidentity_service .create_user_pool (
309+ if not identity_user_pool :
310+ identity_user_pool = self ._veidentity_service .create_user_pool (
311311 name = identity_user_pool_name ,
312312 )
313- issuer = f"https://auth.id.{ self .region } .volces.com/userpool/{ identity_user_pool_id } "
313+ identity_user_pool_id = identity_user_pool [0 ]
314+ identity_user_pool_domain = identity_user_pool [1 ]
314315
315316 # Create APIG upstream for Identity.
316- identity_domain = f"auth.id.{ self .region } .volces.com"
317317 veapig_identity_upstream_id = (
318318 self ._veapig_service .check_domain_upstream_exist (
319- domain = identity_domain ,
319+ domain = identity_user_pool_domain ,
320320 port = 443 ,
321321 gateway_id = veapig_gateway_id ,
322322 )
323323 )
324324 if not veapig_identity_upstream_id :
325325 veapig_identity_upstream_id = (
326326 self ._veapig_service .create_domain_upstream (
327- domain = f"auth.id. { self . region } .volces.com" ,
327+ domain = identity_user_pool_domain ,
328328 port = 443 ,
329329 is_https = True ,
330330 gateway_id = veapig_gateway_id ,
@@ -364,9 +364,9 @@ def deploy(
364364
365365 plugin_name = "wasm-oauth2-sso"
366366 plugin_config = {
367- "AuthorizationUrl" : f"{ issuer } /authorize" ,
367+ "AuthorizationUrl" : f"https:// { identity_user_pool_domain } /authorize" ,
368368 "UpstreamId" : veapig_identity_upstream_id ,
369- "TokenUrl" : f"{ issuer } /oauth/token" ,
369+ "TokenUrl" : f"https:// { identity_user_pool_domain } /oauth/token" ,
370370 "RedirectPath" : "/callback" ,
371371 "SignoutPath" : "/signout" ,
372372 "ClientId" : identity_client_id ,
@@ -377,9 +377,9 @@ def deploy(
377377 plugin_config = {
378378 "RemoteJwks" : {
379379 "UpstreamId" : veapig_identity_upstream_id ,
380- "Url" : f"{ issuer } /keys" ,
380+ "Url" : f"https:// { identity_user_pool_domain } /keys" ,
381381 },
382- "Issuer" : issuer ,
382+ "Issuer" : f"https:// { identity_user_pool_domain } " ,
383383 "ValidateConsumer" : False ,
384384 }
385385 self ._vefaas_service .apig_client .create_plugin_binding (
0 commit comments