Open
Description
Why?
If a token or HMAC key is leaked, it can only be used from specified IP addresses(Enhanced Security).
Requests from unknown IPs will be rejected(Prevents Unauthorized Access).
Many financial and payment services use this method(Industry Standard for Sensitive APIs).
Demo:
- Store
allowed_ips
in the extra field (as JSON) or add a dedicatedallowed_ips
column to auth_identities - Store allowed IPs when generating a token
- Validate IP when using a token
- Allow enabling/disabling this feature in Config/AuthToken.php
- Support for multi IPs
If you disagree or have suggestions for improvement, feel free to comment.