我的应用程序未触发 Google-RISC 安全事件(Google singin)

问题描述 投票:0回答:0

我已经为我们的应用程序实现了 google oauth(成功)登录和 google RISC 安全事件处理。为了启用 oauth,我使用

"API AND SERVICES" -> Service account.

在谷歌控制台上创建了网络应用程序
**STEPS i followed:-**

**1. Create authorization token(JWT).
**2. Call the RISC stream configuration API**

**Eg. code:-**


$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_URL => 'https://risc.googleapis.com/v1beta/stream:update',
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_ENCODING => '',
    CURLOPT_MAXREDIRS => 10,
    CURLOPT_TIMEOUT => 0,
    CURLOPT_FOLLOWLOCATION => true,
    CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_POSTFIELDS =>'{
        "delivery": {
            "delivery_method": "https://schemas.openid.net/secevent/risc/delivery-method/push",
            "url": "https://v4.api.indev.proofhub.com/kvsigninjwt/webhooks/Eventshook/validateSecurityEventToken"
        },
        "events_requested": [
            "https://accounts.google.com/risc/event/sessions-revoked",
            "https://schemas.openid.net/secevent/risc/event-type/sessions-revoked",
            "https://accounts.google.com/risc/event/all-token-revoked",
            "https://schemas.openid.net/secevent/oauth/event-type/tokens-revoked",
            "https://accounts.google.com/risc/event/account-disabled",
            "https://schemas.openid.net/secevent/risc/event-type/account-disabled",
            "https://accounts.google.com/risc/event/account-enabled",
            "https://schemas.openid.net/secevent/risc/event-type/account-enabled",
            "https://accounts.google.com/risc/event/account-credential-change-required",
            "https://schemas.openid.net/secevent/risc/event-type/account-credential-change-required",
            "https://schemas.openid.net/secevent/risc/event-type/verification",
            "https://accounts.google.com/risc/event/one-token-revoked",
            "https://schemas.openid.net/secevent/oauth/event-type/token-revoked"
        ]
    }',
    CURLOPT_HTTPHEADER => array(
        'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJnb29nbGVzaWduaW50ZXN0QHByb29maHViLWluZGV2LTYyMTc0LmlhbS5nc2VydmljZWFjY291bnQuY29tIiwiZXhwIjoxNjU3MTk3OTQ1LCJpc3MiOiJnb29nbGVzaWduaW50ZXN0QHByb29maHViLWluZGV2LTYyMTc0LmlhbS5nc2VydmljZWFjY291bnQuY29tIiwiYXVkIjoiaHR0cHM6XC9cL3Jpc2MuZ29vZ2xlYXBpcy5jb21cL2dvb2dsZS5pZGVudGl0eS5yaXNjLnYxYmV0YS5SaXNjTWFuYWdlbWVudFNlcnZpY2UiLCJpYXQiOjE2NTcxOTQzNDV9.gInolH2RXayGyFsmsSy6ACP-xiXjopb5hb6r0cEwpmqI6WPJNBtpG8j7ez1xFQyjmFuLhRE1JtUy2qBTeK8zH2RPBfnfVjgaJ1RrDi1ppaK_5-WShOz2mbM9rjZxVwJWKREn3DUNFZVMc194WJA-hWpvm_-omhOJxo1ukp5HQIHjwpNqR2a_zJOHBcJnDC6W0GNwq19ISE-nRMRP8BV6NUlrBnBuVzy1MB_wTYyfo-V44hrEkBUM0WWYKVhctCJST0qOqLzUPRerAWbeMOrwTm6lq6pTNmNvbuPp9YZpcuznOiEHgR2yTDGUDWcOzuCxpj0NFcILgnJ7RRLHq2UA9Q',
        'Host: risc.googleapis.com',
        'Content-Type: application/json'
    ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;


**3. Verified on https://risc.googleapis.com/v1beta/stream:verify**

查询:- 如何从谷歌帐户接收事件(使用谷歌登录登录)。?

php authentication google-cloud-platform google-signin
© www.soinside.com 2019 - 2024. All rights reserved.