Package io.quarkus.grpc.auth
Interface GrpcSecurityMechanism
public interface GrpcSecurityMechanism
gRPC security mechanism based on gRPC call metadata
To secure your gRPC endpoints, create a CDI bean implementing this interface.
Make sure that an
IdentityProvider for the AuthenticationRequest
returned by createAuthenticationRequest is available by adding a suitable extension to your application.-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionio.quarkus.security.identity.request.AuthenticationRequestcreateAuthenticationRequest(io.grpc.Metadata metadata) default intbooleanhandles(io.grpc.Metadata metadata)
-
Field Details
-
DEFAULT_PRIORITY
static final int DEFAULT_PRIORITY- See Also:
-
-
Method Details
-
handles
boolean handles(io.grpc.Metadata metadata) - Parameters:
metadata- metadata of the gRPC call- Returns:
- true if and only if the interceptor should handle security for this metadata. An interceptor may decide it should not be triggered for a call e.g. if some header is missing in metadata.
-
createAuthenticationRequest
io.quarkus.security.identity.request.AuthenticationRequest createAuthenticationRequest(io.grpc.Metadata metadata) - Parameters:
metadata- metadata of the gRPC call- Returns:
- authentication request based on the metadata
-
getPriority
default int getPriority()
-