public class BasicGrpcAuthenticationReader extends Object implements GrpcAuthenticationReader
basic auth credentials from the request.| Constructor and Description |
|---|
BasicGrpcAuthenticationReader() |
| Modifier and Type | Method and Description |
|---|---|
Authentication |
readAuthentication(io.grpc.ServerCall<?,?> call,
io.grpc.Metadata headers)
Tries to read the
Authentication information from the given call and metadata. |
public Authentication readAuthentication(io.grpc.ServerCall<?,?> call, io.grpc.Metadata headers) throws AuthenticationException
GrpcAuthenticationReaderAuthentication information from the given call and metadata.
Note: Implementations are free to throw an AuthenticationException if no credentials could be
found in the call. If an exception is thrown by an implementation then the authentication attempt should be
considered as failed and no subsequent GrpcAuthenticationReaders should be called. Additionally, the call
will fail as Status.UNAUTHENTICATED. If the call instead returns null, then the call processing
will proceed unauthenticated.
readAuthentication in interface GrpcAuthenticationReadercall - The call to get that send the request.headers - The metadata/headers as sent by the client.AuthenticationException - If the authentication details are malformed or incomplete and thus the
authentication attempt should be aborted.