PHP: Add Guide "With server authentication SSL/TLS" (#850)

This commit is contained in:
Hayashi Takuya 2021-09-16 05:22:55 +09:00 committed by GitHub
parent 20fffd5f91
commit 7ad5bc5220
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -642,6 +642,14 @@ $client = new helloworld\GreeterClient('localhost:50051', [
]);
```
##### With server authentication SSL/TLS
```php
$client = new helloworld\GreeterClient('myservice.example.com', [
'credentials' => Grpc\ChannelCredentials::createSsl(file_get_contents('roots.pem')),
]);
```
##### Authenticate with Google
```php