Interface StorageServiceAuthWiring

All Superinterfaces:
ServiceAuthWiring<StorageServiceGrpc.StorageServiceImplBase>
All Known Implementing Classes:
StorageServiceAuthWiring.AllowAll, StorageServiceAuthWiring.DenyAll, StorageServiceAuthWiring.TestUseOnly

public interface StorageServiceAuthWiring extends ServiceAuthWiring<StorageServiceGrpc.StorageServiceImplBase>
This interface provides type-safe authorization hooks for StorageServiceGrpc.
  • Method Details

    • intercept

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

      void onMessageReceivedListItems(AuthContext authContext, ListItemsRequest request)
      Authorize a request to ListItems.
      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 ListItems
    • onMessageReceivedFetchFile

      void onMessageReceivedFetchFile(AuthContext authContext, FetchFileRequest request)
      Authorize a request to FetchFile.
      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 FetchFile
    • onMessageReceivedSaveFile

      void onMessageReceivedSaveFile(AuthContext authContext, SaveFileRequest request)
      Authorize a request to SaveFile.
      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 SaveFile
    • onMessageReceivedMoveItem

      void onMessageReceivedMoveItem(AuthContext authContext, MoveItemRequest request)
      Authorize a request to MoveItem.
      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 MoveItem
    • onMessageReceivedCreateDirectory

      void onMessageReceivedCreateDirectory(AuthContext authContext, CreateDirectoryRequest request)
      Authorize a request to CreateDirectory.
      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 CreateDirectory
    • onMessageReceivedDeleteItem

      void onMessageReceivedDeleteItem(AuthContext authContext, DeleteItemRequest request)
      Authorize a request to DeleteItem.
      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 DeleteItem