Last update:2024-08-20 15:05:04
The URL Authentication Generator allows you to quickly generate authenticated URLs for various authentication modes based on specific configurations. You can use these URLs to verify if the configured URL authentication meets your requirements.
We recommend deploying the URL authentication configuration to a test environment first. Then, use the URL Authentication Calculator to generate authenticated URLs for validation, to prevent any potential misconfigurations from affecting the production environment.
Here is an example of generating an authenticated URL for Mode A. The original URL requiring authentication is:
http://domain.com/browse/index.html
Based on the requirements, the URL Authentication is supposed to be configured as follows:
uri
parameter in the URL authentication configuration. In this example, the path is /browse/index.html
.cdnw_secret
.Decimal (Unix timestamp)
.$uri$ourkey$time
.300
.The actual configuration is shown below:
Once the parameters are entered, the system will automatically generate the authenticated URL for you, as shown below:
You can use the generated URL http://$domain/1716195349/ca98676765067584dae581274dd7e161/browse/index.html
to send a request to the CDN edge server. If the request is made within 5 minutes and the authentication information is validated successfully, the CDN edge server will respond with the content to the client. After 5 minutes, as the authentication information expires, the response will be rejected, and a 403
status code will be returned to the client. This demonstrates that the URL authentication configuration is correct.
Please note that the
$domain
in the generated URL is just an example and not the actual domain name used in the request. For actual use, you need to replace it with the domain name you have added on the CDN platform.