mirror of https://github.com/grpc/grpc-java.git
Update AUTH-README.md
This commit is contained in:
parent
7dbd1fe4e4
commit
d09b16d065
|
|
@ -18,8 +18,14 @@ Note that you must use the release of the Jetty-ALPN jar specific to the version
|
||||||
|
|
||||||
An option is provided to use GRPC over plaintext without TLS. This is convenient for testing environments, however users must be aware of the secuirty risks of doing so for real production systems.
|
An option is provided to use GRPC over plaintext without TLS. This is convenient for testing environments, however users must be aware of the secuirty risks of doing so for real production systems.
|
||||||
|
|
||||||
ALPN is supported starting Android 4.4, but it only works well in 5.0 and higher.
|
On Android, it is needed to <a href="https://developer.android.com/training/articles/security-gms-provider.html">update your security provider</a> to enable ALPN support, especially for Android versions < 5.0. If the provider fails to update, ALPN may not work.
|
||||||
In lower versions, an alternative is to use NPN which Android has support from 4.1. However, the corresponding GRPC server will also need to enable NPN.
|
After the update is done, you'll need to pass an SSLSocketFactorty to OkHttpChannelBuilder, like the code snippet below shows.
|
||||||
|
|
||||||
|
```java
|
||||||
|
OkHttpChannelBuilder channelBuilder = OkHttpChannelBuilder.forAddress(host, port)
|
||||||
|
.sslSocketFactory(SSLContext.getDefault().getSocketFactory());
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
# Using OAuth2
|
# Using OAuth2
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue