getByAccessKey example

public function validateClient($clientIdentifier$clientSecret$grantType): bool
    {
        if (($grantType === 'password' || $grantType === 'refresh_token') && $clientIdentifier === 'administration') {
            return true;
        }

        if ($grantType === 'client_credentials' && $clientSecret !== null) {
            if (!\is_string($clientIdentifier)) {
                return false;
            }

            $values = $this->getByAccessKey($clientIdentifier);
            if (!$values) {
                return false;
            }

            return password_verify($clientSecret(string) $values['secret_access_key']);
        }

        // @codeCoverageIgnoreStart         throw OAuthServerException::unsupportedGrantType();
        // @codeCoverageIgnoreEnd     }

    
Home | Imprint | This part of the site doesn't use cookies.