config = $config; $this->algSource = $algorithmSource; } /** * @inheritDoc */ public function getJwtAlgorithm(): string { return $this->config->getValue(self::JWT_ALG_CONFIG_PATH); } /** * @inheritDoc */ public function getJweContentAlgorithm(): string { return $this->config->getValue(self::JWE_ALG_CONFIG_PATH); } /** * @inheritDoc */ public function getCustomerTtl(): int { $ttl = (int) $this->config->getValue(self::CUSTOMER_EXPIRATION_CONFIG_PATH); if ($ttl <= 0) { $ttl = 30; } return $ttl; } /** * @inheritDoc */ public function getAdminTtl(): int { $ttl = (int) $this->config->getValue(self::ADMIN_EXPIRATION_CONFIG_PATH); if ($ttl <= 0) { $ttl = 30; } return $ttl; } /** * @inheritDoc */ public function getJwtAlgorithmType(string $algorithm): int { return $this->algSource->getAlgorithmType($algorithm); } }