Class MechanismRealmConfiguration.Builder

  • Enclosing class:
    MechanismRealmConfiguration

    public static final class MechanismRealmConfiguration.Builder
    extends Object
    A builder for mechanism realm configuration.
    • Constructor Detail

      • Builder

        Builder()
        Construct a new instance.
    • Method Detail

      • setRealmName

        public MechanismRealmConfiguration.Builder setRealmName​(String realmName)
        Sets a name of the realm to be presented by the mechanism.
        Parameters:
        realmName - a name of the realm to be presented by the mechanism
        Returns:
        this builder
      • setPreRealmRewriter

        public MechanismRealmConfiguration.Builder setPreRealmRewriter​(Function<Principal,​Principal> preRealmRewriter)
        Set a principal transformer to apply before the realm is selected.
        Parameters:
        preRealmRewriter - a principal transformer to apply before the realm is selected
        Returns:
        this builder
      • setPostRealmRewriter

        public MechanismRealmConfiguration.Builder setPostRealmRewriter​(Function<Principal,​Principal> postRealmRewriter)
        Set a principal transformer to apply after the realm is selected. Any previously set credential source will be overwritten.
        Parameters:
        postRealmRewriter - a principal transformer to apply after the realm is selected
        Returns:
        this builder
      • setFinalRewriter

        public MechanismRealmConfiguration.Builder setFinalRewriter​(Function<Principal,​Principal> finalRewriter)
        Set a final principal transformer to apply for this mechanism realm. Any previously set credential source will be overwritten.
        Parameters:
        finalRewriter - a final principal transformer to apply for this mechanism realm
        Returns:
        this builder
      • setRealmMapper

        public MechanismRealmConfiguration.Builder setRealmMapper​(RealmMapper realmMapper)
        Sets a realm mapper to be used by the mechanism. Any previously set credential source will be overwritten.
        Parameters:
        realmMapper - a realm mapper to be used by the mechanism
        Returns:
        this builder