@@ -205,11 +205,11 @@ def get(self):
205205
206206
207207def _handle_userinfo_request (request , oidc = False ):
208+ tenant_id = g .request_tenant_id
208209 if oidc :
209- logger .debug (f'top of GET /v3/oauth2/userinfo/oidc' )
210+ logger .debug (f'top of GET /v3/oauth2/userinfo/oidc - tenant_id: { tenant_id } ' )
210211 else :
211- logger .debug (f'top of GET /v3/oauth2/userinfo' )
212- tenant_id = g .request_tenant_id
212+ logger .debug (f'top of GET /v3/oauth2/userinfo - tenant_id: { tenant_id } ' )
213213 # note that the user info endpoint is more limited for custom oauth idp extensions in general because the
214214 # custom OAuth server may not provide a profile endpoint.
215215 custom_oa2_extension_type = tenant_configs_cache .get_custom_oa2_extension_type (tenant_id = tenant_id )
@@ -219,8 +219,10 @@ def _handle_userinfo_request(request, oidc=False):
219219 # tapis/account_type tapis/client_id tapis/grant_type
220220
221221 if custom_oa2_extension_type and not custom_oa2_extension_type == 'ldap' :
222+ logger .debug (f"Using custom auth for userinfo; custom_oa2_extension_type: { custom_oa2_extension_type } " )
223+ logger .debug (f"g.token_claims - { g .token_claims } " )
222224 result = {"username" : g .username }
223- return utils .ok (result = result , msg = "User profile retrieved successfully. " )
225+ return utils .ok (result = result , msg = "User profile retrieved successfully - custom auth extension provider " )
224226
225227 userinfo = get_tenant_user (tenant_id = tenant_id , username = g .username )
226228
@@ -412,29 +414,6 @@ def put(self):
412414# OIDC endpoints
413415# ---------------------------------
414416
415- # class OIDCMetadataResource(Resource):
416- # """
417- # Provides the OIDC .well-known endpoint.
418- # """
419- # def get(self):
420- # logger.info("top of GET /v3/oauth2/.well-known/openid-configuration")
421- # tenant_id = g.request_tenant_id
422- # config = tenant_configs_cache.get_config(tenant_id)
423- # allowable_grant_types = json.loads(config.allowable_grant_types)
424- # tenant = t.tenant_cache.get_tenant_config(tenant_id=tenant_id)
425- # base_url = tenant.base_url
426- # json_response = {
427- # 'issuer': f'{base_url}/v3/tokens',
428- # 'authorization_endpoint': f'{base_url}/v3/oauth2/authorize',
429- # 'token_endpoint': f'{base_url}/v3/oauth2/tokens/oidc?oidc=true',
430- # 'jwks_uri': f'{base_url}/v3/oauth2/jwks',
431- # 'registration_endpoint': f'{base_url}/v3/oauth2/clients',
432- # 'grant_types_supported': allowable_grant_types,
433- # 'userinfo_endpoint': f'{base_url}/v3/oauth2/userinfo/oidc',
434- # }
435- # return json_response #utils.ok(result=metadata, msg='OAuth OIDC metadata retrieved successfully.')
436-
437-
438417class OIDCjwksResource (Resource ):
439418 """
440419 Provides the OIDC jwks endpoint.
0 commit comments