Class SecurityViewModelProcessor

java.lang.Object
io.micronaut.views.model.security.SecurityViewModelProcessor
All Implemented Interfaces:
ViewModelProcessor<Map<String,Object>>

@Requires(property="micronaut.security.views-model-decorator.enabled",notEquals="false") @Requires(beans={io.micronaut.security.filters.SecurityFilter.class,SecurityViewModelProcessorConfiguration.class}) @Requires(classes=io.micronaut.http.HttpRequest.class) @Singleton public non-sealed class SecurityViewModelProcessor extends Object
Returns information about the current user so that it can be appended to the model being rendered.
Since:
1.1.0
Author:
Sergio del Amo
  • Constructor Details

  • Method Details

    • populateModel

      public void populateModel(io.micronaut.http.HttpRequest<?> request, Map<String,Object> model)
    • process

      default void process(@NonNull @NonNull io.micronaut.http.HttpRequest<?> request, @NonNull @NonNull ModelAndView<Map<String,Object>> modelAndView)
      Description copied from interface: ViewModelProcessor
      Invoked prior to the view rendering.
      Specified by:
      process in interface ViewModelProcessor<Map<String,Object>>
      Parameters:
      request - The request being processed
      modelAndView - The model and view