Skip to content

Commit 8fd3a3a

Browse files
authored
ENG-3831 - Add missing client method lookups and test harness (#1244)
Problem: 1. We were missing tenantId on lookupIdentityProvider 2. We were missing deleteWebAuthnCredentialsByUser Solution: 1. Add lookupIdentityProviderByTenantId to go with lookupIdentityProvider 2. Add a new deleteWebAuthnCredentialsForUser to go with deleteWebAuthnCredentials 3. Surface some PMVC route printing code to deterministically get all of our routes and action classes. 4. Add an AI written test that looks for missing parameters.
1 parent 0a39a69 commit 8fd3a3a

1 file changed

Lines changed: 29 additions & 1 deletion

File tree

src/main/python/fusionauth/fusionauth_client.py

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1407,6 +1407,18 @@ def delete_web_authn_credential(self, id):
14071407
.delete() \
14081408
.go()
14091409

1410+
def delete_web_authn_credentials_for_user(self, user_id):
1411+
"""
1412+
Deletes all of the WebAuthn credentials for the given User Id.
1413+
1414+
Attributes:
1415+
user_id: The unique Id of the User to delete WebAuthn passkeys for.
1416+
"""
1417+
return self.start().uri('/api/webauthn') \
1418+
.url_parameter('userId', self.convert_true_false(user_id)) \
1419+
.delete() \
1420+
.go()
1421+
14101422
def delete_webhook(self, webhook_id):
14111423
"""
14121424
Deletes the webhook for the given Id.
@@ -2045,14 +2057,30 @@ def logout_with_request(self, request):
20452057

20462058
def lookup_identity_provider(self, domain):
20472059
"""
2048-
Retrieves the identity provider for the given domain. A 200 response code indicates the domain is managed
2060+
Retrieves any global identity providers for the given domain. A 200 response code indicates the domain is managed
2061+
by a registered identity provider. A 404 indicates the domain is not managed.
2062+
2063+
Attributes:
2064+
domain: The domain or email address to lookup.
2065+
"""
2066+
return self.start().uri('/api/identity-provider/lookup') \
2067+
.url_parameter('domain', self.convert_true_false(domain)) \
2068+
.get() \
2069+
.go()
2070+
2071+
def lookup_identity_provider_by_tenant_id(self, domain, tenant_id):
2072+
"""
2073+
Retrieves the identity provider for the given domain and tenantId. A 200 response code indicates the domain is managed
20492074
by a registered identity provider. A 404 indicates the domain is not managed.
20502075
20512076
Attributes:
20522077
domain: The domain or email address to lookup.
2078+
tenant_id: If provided, the API searches for an identity provider scoped to the corresponding tenant that manages the requested domain.
2079+
If no result is found, the API then searches for global identity providers.
20532080
"""
20542081
return self.start().uri('/api/identity-provider/lookup') \
20552082
.url_parameter('domain', self.convert_true_false(domain)) \
2083+
.url_parameter('tenantId', self.convert_true_false(tenant_id)) \
20562084
.get() \
20572085
.go()
20582086

0 commit comments

Comments
 (0)