mestafrica / mobile-wallet-fraud-database

Currently, curbing mobile money fraud in the country is nearly impossible. To tackle this issue, we propose developing a real-time database that allows users to query and determine if a phone number is likely fraudulent based on public contributions, especially from those who have experienced fraud.
MIT License
0 stars 17 forks source link

Update API Key #59

Closed alexboateng closed 2 months ago

alexboateng commented 2 months ago

Endpoint: /api/keys/restrict/{keyId} Method: PUT Description: Allows users to add or update domain restrictions for an existing API key. Authorization Required: Yes

Parameters: Domains: A list of new or updated domains for restriction. Validations: Domains: Each domain must be in a valid format. Check for domain uniqueness within the user's API keys to ensure no duplicate restrictions.

Security Measures: Authorization Check: Ensure the user is authenticated and owns the API key before updating restrictions. Input Sanitization: Validate and sanitize the input domains to avoid injection attacks.

Feedback: Success: "Domain restrictions updated successfully." Failure: "Failed to update domain restrictions. Ensure domains are valid and unique."

muchinon commented 2 months ago

@alexboateng I would like to pick up the issue

muchinon commented 2 months ago

https://github.com/mestafrica/mobile-wallet-fraud-database/pull/64