Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

\Qiniu\Auth::verifyCallback 无法实现对持久化处理的回调验证 #428

Open
xpader opened this issue Mar 15, 2024 · 0 comments
Open

Comments

@xpader
Copy link

xpader commented Mar 15, 2024

看了下持久化回调的验证,回调时的 Authorization 似乎已经变了,以前只要调用 \Qiniu\Auth::verifyCallback() 方法就可以验证,现在已经无法进行验证了。

看了下实现,verifyCallback() 里验证的格式是 Authorization: QBox 开头。
但是现在的回调是 Authorization: Qiniu 开头,并且算法也变了。

目前发现可以继续用 sdk 进行验证的方法是:

        $auth->options['disableQiniuTimestampSignature'] = true;
        $sign = $auth->authorizationV2($currentUrl, $method, $requestBody, $contentType);

        if ($sign['Authorization'] !== $authorization) {
            // 验证失败
        }

使用 SDK 中的 authorizationV2() 并表在验证前配置 disableQiniuTimestampSignature 选项即可得到相同的签名。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant