all: fix bad ref to ServerCall

This commit is contained in:
Carl Mastrangelo 2017-05-26 14:27:53 -07:00 committed by GitHub
parent cefcd39396
commit ecbacf0856
1 changed files with 2 additions and 2 deletions

View File

@ -266,7 +266,7 @@ Server server = NettyServerBuilder.forPort(8443)
.build()); .build());
``` ```
Negotiated client certificates are available in the SSLSession, which is found in the SSL_SESSION_KEY attribute of <a href="https://github.com/grpc/grpc-java/blob/master/core/src/main/java/io/grpc/ServerCall.java">ServerCall</a>. A server interceptor can provide details in the current Context. Negotiated client certificates are available in the SSLSession, which is found in the `TRANSPORT_ATTR_SSL_SESSION` attribute of <a href="https://github.com/grpc/grpc-java/blob/master/core/src/main/java/io/grpc/Grpc.java">Grpc</a>. A server interceptor can provide details in the current Context.
```java ```java
public final static Context.Key<SSLSession> SSL_SESSION_CONTEXT = Context.key("SSLSession"); public final static Context.Key<SSLSession> SSL_SESSION_CONTEXT = Context.key("SSLSession");
@ -274,7 +274,7 @@ public final static Context.Key<SSLSession> SSL_SESSION_CONTEXT = Context.key("S
@Override @Override
public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<RespT> call, public <ReqT, RespT> ServerCall.Listener<ReqT> interceptCall(ServerCall<RespT> call,
Metadata headers, ServerCallHandler<ReqT, RespT> next) { Metadata headers, ServerCallHandler<ReqT, RespT> next) {
SSLSession sslSession = call.attributes().get(ServerCall.SSL_SESSION_KEY); SSLSession sslSession = call.attributes().get(Grpc.TRANSPORT_ATTR_SSL_SESSION);
if (sslSession == null) { if (sslSession == null) {
return next.startCall(call, headers) return next.startCall(call, headers)
} }