A computer-implemented method for delivering restricted-access resources hosted on an origin server using a content delivery network - CDN - comprising a plurality of CDN servers, the method comprising: - receiving, by a CDN server from a client, a request for a restricted-access resource hosted on the origin server, wherein the request comprises a resource identifier of the restricted-access resource and an authentication token; - performing a delivery step comprising: -- creating, by the CDN server, a composite cache key comprising the resource identifier and at least part of the authentication token; -- comparing, by the CDN server, the composite cache key with one or more composite cache keys previously stored at the CDN server; -- if a match between the composite cache key and one of the previously stored composite cache key is found, delivering, by the CDN server, a response associated to the composite cache key to the client; -- if no match between the composite cache key and one of the previously stored composite cache key is found, performing a retrieval step comprising: --- forwarding, by the CDN server, the request to the origin server; --- checking, by the origin server, whether the authentication token allows access to the restricted-access resource; if the access is allowed: --- retrieving, by the origin server, the restricted-access resource; --- sending, by the origin server, a response comprising the restricted-access resource to the CDN server; if the access is not allowed: --- sending, by the origin server, a response comprising a refusal of the request to the CDN server; --- storing, by the CDN server, the response in association to the composite cache key; --- delivering, by the CDN server, the response to the client. - receiving, by a CDN server from a client, a request for a restricted-access resource hosted on the origin server, wherein the request comprises a resource identifier of the restricted-access resource and an authentication token; - performing a delivery step comprising: -- creating, by the CDN server, a composite cache key comprising the resource identifier and at least part of the authentication token; -- comparing, by the CDN server, the composite cache key with one or more composite cache keys previously stored at the CDN server; -- if a match between the composite cache key and one of the previously stored composite cache key is found, delivering, by the CDN server, a response associated to the composite cache key to the client; -- if no match between the composite cache key and one of the previously stored composite cache key is found, performing a retrieval step comprising: --- forwarding, by the CDN server, the request to the origin server; --- checking, by the origin server, whether the authentication token allows access to the restricted-access resource; if the access is allowed: --- retrieving, by the origin server, the restricted-access resource; --- sending, by the origin server, a response comprising the restricted-access resource to the CDN server; if the access is not allowed: --- sending, by the origin server, a response comprising a refusal of the request to the CDN server; --- storing, by the CDN server, the response in association to the composite cache key; --- delivering, by the CDN server, the response to the client. -- creating, by the CDN server, a composite cache key comprising the resource identifier and at least part of the authentication token; -- comparing, by the CDN server, the composite cache key with one or more composite cache keys previously stored at the CDN server; -- if a match between the composite cache key and one of the previously stored composite cache key is found, delivering, by the CDN server, a response associated to the composite cache key to the client; -- if no match between the composite cache key and one of the previously stored composite cache key is found, performing a retrieval step comprising: --- forwarding, by the CDN server, the request to the origin server; --- checking, by the origin server, whether the authentication token allows access to the restricted-access resource; if the access is allowed: --- retrieving, by the origin server, the restricted-access resource; --- sending, by the origin server, a response comprising the restricted-access resource to the CDN server; if the access is not allowed: --- sending, by the origin server, a response comprising a refusal of the request to the CDN server; --- storing, by the CDN server, the response in association to the composite cache key; --- delivering, by the CDN server, the response to the client. --- forwarding, by the CDN server, the request to the origin server; --- checking, by the origin server, whether the authentication token allows access to the restricted-access resource; if the access is allowed: --- retrieving, by the origin server, the restricted-access resource; --- sending, by the origin server, a response comprising the restricted-access resource to the CDN server; if the access is not allowed: --- sending, by the origin server, a response comprising a refusal of the request to the CDN server; --- retrieving, by the origin server, the restricted-access resource; --- sending, by the origin server, a response comprising the restricted-access resource to the CDN server; if the access is not allowed: --- sending, by the origin server, a response comprising a refusal of the request to the CDN server; --- storing, by the CDN server, the response in association to the composite cache key; --- delivering, by the CDN server, the response to the client.