Record Class SecurityEnforcer.Options

java.lang.Object
java.lang.Record
com.evolveum.midpoint.security.enforcer.api.SecurityEnforcer.Options
Enclosing interface:
SecurityEnforcer

public static record SecurityEnforcer.Options(@Nullable OwnerResolver customOwnerResolver, @Nullable SecurityEnforcer.LogCollector logCollector, @Nullable Consumer<Authorization> applicableAutzConsumer, boolean failOnNoAccess) extends Record
  • Constructor Details

    • Options

      public Options(@Nullable @Nullable OwnerResolver customOwnerResolver, @Nullable @Nullable SecurityEnforcer.LogCollector logCollector, @Nullable @Nullable Consumer<Authorization> applicableAutzConsumer, boolean failOnNoAccess)
      Creates an instance of a Options record class.
      Parameters:
      customOwnerResolver - the value for the customOwnerResolver record component
      logCollector - the value for the logCollector record component
      applicableAutzConsumer - the value for the applicableAutzConsumer record component
      failOnNoAccess - the value for the failOnNoAccess record component
  • Method Details

    • create

      public static SecurityEnforcer.Options create()
    • withCustomOwnerResolver

      @NotNull public @NotNull SecurityEnforcer.Options withCustomOwnerResolver(OwnerResolver resolver)
      Custom owner resolver to be used for this operation. If not specified, a default resolver (based on a MidPointPrincipalManager) is used.
    • withLogCollector

      @NotNull public @NotNull SecurityEnforcer.Options withLogCollector(SecurityEnforcer.LogCollector logCollector)
      Sends all the tracing messages also to the specified collector (besides logging them as usual).
    • withApplicableAutzConsumer

      @NotNull public @NotNull SecurityEnforcer.Options withApplicableAutzConsumer(Consumer<Authorization> applicableAutzConsumer)
      Sends all the applicable authorizations to the specified consumer.
    • withNoFailOnNoAccess

      @NotNull public @NotNull SecurityEnforcer.Options withNoFailOnNoAccess()
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • customOwnerResolver

      @Nullable public @Nullable OwnerResolver customOwnerResolver()
      Returns the value of the customOwnerResolver record component.
      Returns:
      the value of the customOwnerResolver record component
    • logCollector

      @Nullable public @Nullable SecurityEnforcer.LogCollector logCollector()
      Returns the value of the logCollector record component.
      Returns:
      the value of the logCollector record component
    • applicableAutzConsumer

      @Nullable public @Nullable Consumer<Authorization> applicableAutzConsumer()
      Returns the value of the applicableAutzConsumer record component.
      Returns:
      the value of the applicableAutzConsumer record component
    • failOnNoAccess

      public boolean failOnNoAccess()
      Returns the value of the failOnNoAccess record component.
      Returns:
      the value of the failOnNoAccess record component