Package io.grpc
Class ChoiceChannelCredentials
java.lang.Object
io.grpc.ChannelCredentials
io.grpc.ChoiceChannelCredentials
Provides a list of
ChannelCredentials
, where any one may be used. The credentials are in
preference order.-
Method Summary
Modifier and TypeMethodDescriptionstatic ChannelCredentials
create
(ChannelCredentials... creds) Constructs with the providedcreds
as options, with preferred credentials first.Non-empty list of credentials, in preference order.Returns the ChannelCredentials stripped of its CallCredentials.
-
Method Details
-
create
Constructs with the providedcreds
as options, with preferred credentials first.- Throws:
IllegalArgumentException
- if no creds are provided
-
getCredentialsList
Non-empty list of credentials, in preference order. -
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
-