Interface ObjectServiceAuthWiring

All Superinterfaces:
ServiceAuthWiring<ObjectServiceGrpc.ObjectServiceImplBase>
All Known Implementing Classes:
ObjectServiceAuthWiring.AllowAll, ObjectServiceAuthWiring.DenyAll, ObjectServiceAuthWiring.TestUseOnly

public interface ObjectServiceAuthWiring extends ServiceAuthWiring<ObjectServiceGrpc.ObjectServiceImplBase>
This interface provides type-safe authorization hooks for ObjectServiceGrpc.
  • Method Details

    • intercept

      default io.grpc.ServerServiceDefinition intercept(ObjectServiceGrpc.ObjectServiceImplBase delegate)
      Wrap the real implementation with authorization checks.
      Specified by:
      intercept in interface ServiceAuthWiring<ObjectServiceGrpc.ObjectServiceImplBase>
      Parameters:
      delegate - the real service implementation
      Returns:
      the wrapped service implementation
    • onMessageReceivedFetchObject

      void onMessageReceivedFetchObject(AuthContext authContext, FetchObjectRequest request)
      Authorize a request to FetchObject.
      Parameters:
      authContext - the authentication context of the request
      request - the request to authorize
      Throws:
      io.grpc.StatusRuntimeException - if the user is not authorized to invoke FetchObject
    • onCallStartedMessageStream

      void onCallStartedMessageStream(AuthContext authContext)
      Authorize a request to open a client-streaming rpc MessageStream.
      Parameters:
      authContext - the authentication context of the request
      Throws:
      io.grpc.StatusRuntimeException - if the user is not authorized to invoke MessageStream
    • onMessageReceivedMessageStream

      void onMessageReceivedMessageStream(AuthContext authContext, StreamRequest request)
      Authorize a request to MessageStream.
      Parameters:
      authContext - the authentication context of the request
      request - the request to authorize
      Throws:
      io.grpc.StatusRuntimeException - if the user is not authorized to invoke MessageStream
    • onMessageReceivedOpenMessageStream

      void onMessageReceivedOpenMessageStream(AuthContext authContext, StreamRequest request)
      Authorize a request to OpenMessageStream.
      Parameters:
      authContext - the authentication context of the request
      request - the request to authorize
      Throws:
      io.grpc.StatusRuntimeException - if the user is not authorized to invoke OpenMessageStream
    • onMessageReceivedNextMessageStream

      void onMessageReceivedNextMessageStream(AuthContext authContext, StreamRequest request)
      Authorize a request to NextMessageStream.
      Parameters:
      authContext - the authentication context of the request
      request - the request to authorize
      Throws:
      io.grpc.StatusRuntimeException - if the user is not authorized to invoke NextMessageStream