Added support to configure domain redirects but taking into consideration the permissions on an API key

This commit is contained in:
Alejandro Celaya
2021-07-29 19:08:29 +02:00
committed by Alejandro Celaya
parent 2ac7be4363
commit 5a1a4f5594
6 changed files with 112 additions and 28 deletions

View File

@@ -22,9 +22,19 @@ interface DomainServiceInterface
*/
public function getDomain(string $domainId): Domain;
public function getOrCreate(string $authority): Domain;
/**
* @throws DomainNotFoundException If the API key is restricted to one domain and a different one is provided
*/
public function getOrCreate(string $authority, ?ApiKey $apiKey = null): Domain;
public function findByAuthority(string $authority): ?Domain;
public function findByAuthority(string $authority, ?ApiKey $apiKey = null): ?Domain;
public function configureNotFoundRedirects(string $authority, NotFoundRedirects $notFoundRedirects): Domain;
/**
* @throws DomainNotFoundException If the API key is restricted to one domain and a different one is provided
*/
public function configureNotFoundRedirects(
string $authority,
NotFoundRedirects $notFoundRedirects,
?ApiKey $apiKey = null,
): Domain;
}