@Override public String authority() { return mChannel.authority(); }
@Override public String authority() { return channel.authority(); } }
@Override public String authority() { return interceptorChannel.authority(); }
@Override public String authority() { return channel.authority(); } }
@Override public String authority() { return channel.authority(); } }
@Override public String authority() { return channel.authority(); } }
@Override public String authority() { return interceptorChannel.authority(); }
@Override public String authority() { return delegate().authority(); }
/** * Generate a JWT-specific service URI. The URI is simply an identifier with enough information * for a service to know that the JWT was intended for it. The URI will commonly be verified with * a simple string equality check. */ private URI serviceUri(Channel channel, MethodDescriptor<?, ?> method) throws StatusException { String authority = channel.authority(); if (authority == null) { throw Status.UNAUTHENTICATED.withDescription("Channel has no authority").asException(); } // Always use HTTPS, by definition. final String scheme = "https"; final int defaultPort = 443; String path = "/" + MethodDescriptor.extractFullServiceName(method.getFullMethodName()); URI uri; try { uri = new URI(scheme, authority, path, null, null); } catch (URISyntaxException e) { throw Status.UNAUTHENTICATED.withDescription("Unable to construct service URI for auth") .withCause(e).asException(); } // The default port must not be present. Alternative ports should be present. if (uri.getPort() == defaultPort) { uri = removePort(uri); } return uri; }
String authority = channel.authority(); if (authority == null) { throw Status.UNAUTHENTICATED