Class FieldValidator.Builder

java.lang.Object
io.helidon.security.jwt.FieldValidator.Builder
All Implemented Interfaces:
Builder<io.helidon.security.jwt.CommonValidator.BaseBuilder<FieldValidator.Builder,FieldValidator>,FieldValidator>, Supplier<FieldValidator>
Enclosing class:
FieldValidator

public static final class FieldValidator.Builder extends Object
Builder of the FieldValidator.
  • Method Details

    • claimKey

      public FieldValidator.Builder claimKey(String claimKey)
      Set handled claim key.
      Parameters:
      claimKey - supported claim key
      Returns:
      updated builder instance
    • name

      public FieldValidator.Builder name(String name)
      Field name value.
      Parameters:
      name - name of the field
      Returns:
      updated builder instance
    • expectedValue

      public FieldValidator.Builder expectedValue(String expectedValue)
      Expected value to be present in the supported claim.
      Parameters:
      expectedValue - expected claim value
      Returns:
      updated builder instance
    • fieldAccessor

      public FieldValidator.Builder fieldAccessor(Function<Jwt,Optional<String>> fieldAccessor)
      Function to extract field from JWT.
      Parameters:
      fieldAccessor - function to extract field from JWT
      Returns:
      updated builder instance
    • scope

      public FieldValidator.Builder scope(JwtScope scope)
    • build

      public FieldValidator build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Returns:
      instance of the built type
    • mandatory

      public FieldValidator.Builder mandatory(boolean mandatory)
      Whether handled claim is mandatory to be present. Default value is false.
      Parameters:
      mandatory - mandatory to be present
      Returns:
      updated builder instance
    • missingClaimMessage

      public FieldValidator.Builder missingClaimMessage(String missingClaimMessage)
      Custom missing claim error message.
      Parameters:
      missingClaimMessage - missing claim error message
      Returns:
      updated builder instance
    • me

      protected FieldValidator.Builder me()