Package io.grpc
Class CompositeChannelCredentials
- java.lang.Object
-
- io.grpc.ChannelCredentials
-
- io.grpc.CompositeChannelCredentials
-
public final class CompositeChannelCredentials extends ChannelCredentials
ChannelCredentials
which use per-RPCCallCredentials
. If theChannelCredentials
has multipleCallCredentials
(e.g., a composite credential inside a composite credential), then all of theCallCredentials
should be used; oneCallCredentials
does not override another.
-
-
Field Summary
Fields Modifier and Type Field Description private CallCredentials
callCredentials
private ChannelCredentials
channelCredentials
-
Constructor Summary
Constructors Modifier Constructor Description private
CompositeChannelCredentials(ChannelCredentials channelCreds, CallCredentials callCreds)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ChannelCredentials
create(ChannelCredentials channelCreds, CallCredentials callCreds)
CallCredentials
getCallCredentials()
ChannelCredentials
getChannelCredentials()
ChannelCredentials
withoutBearerTokens()
Returns the ChannelCredentials stripped of its CallCredentials.
-
-
-
Field Detail
-
channelCredentials
private final ChannelCredentials channelCredentials
-
callCredentials
private final CallCredentials callCredentials
-
-
Constructor Detail
-
CompositeChannelCredentials
private CompositeChannelCredentials(ChannelCredentials channelCreds, CallCredentials callCreds)
-
-
Method Detail
-
create
public static ChannelCredentials create(ChannelCredentials channelCreds, CallCredentials callCreds)
-
getChannelCredentials
public ChannelCredentials getChannelCredentials()
-
getCallCredentials
public CallCredentials getCallCredentials()
-
withoutBearerTokens
public ChannelCredentials withoutBearerTokens()
Description copied from class:ChannelCredentials
Returns the ChannelCredentials stripped of its CallCredentials. In the future, this may strip only some of the CallCredentials, preserving call credentials that are safe from replay attacks (e.g., if the token is bound to the channel's certificate).- Specified by:
withoutBearerTokens
in classChannelCredentials
-
-