/** * Sets a pre-realm name rewriter, which rewrites the authentication name before a realm is selected. * * @param rewriter the name rewriter (must not be {@code null}) * @return this builder */ public Builder setPreRealmRewriter(NameRewriter rewriter) { return setPreRealmRewriter(rewriter.asPrincipalRewriter()); }
/** * Sets a post-realm name rewriter, which rewrites the authentication name after a realm is selected. * * @param rewriter the name rewriter (must not be {@code null}) * @return this builder */ public Builder setPostRealmRewriter(NameRewriter rewriter) { return setPostRealmRewriter(rewriter.asPrincipalRewriter()); }
/** * Create a new configuration which is the same as this configuration, but rewrites the user name using <em>only</em> * the given name rewriter. Any name rewriters on this configuration are ignored for the new configuration. * * @param rewriter the name rewriter * @return the new configuration */ public AuthenticationConfiguration rewriteUserOnlyWith(NameRewriter rewriter) { if (rewriter == null) { return this; } return new AuthenticationConfiguration(this, SET_PRINCIPAL_RW, rewriter.asPrincipalRewriter()); }
@Deprecated public RealmBuilder setNameRewriter(final NameRewriter nameRewriter) { return setPrincipalRewriter(nameRewriter.asPrincipalRewriter()); }
/** * Create a new configuration which is the same as this configuration, but rewrites the user name using the given * name rewriter. The name rewriter is appended to the the existing name rewrite function. * * @param rewriter the name rewriter * @return the new configuration */ public AuthenticationConfiguration rewriteUser(NameRewriter rewriter) { if (rewriter == null) { return this; } if (this.principalRewriter == null) { return new AuthenticationConfiguration(this, SET_PRINCIPAL_RW, rewriter.asPrincipalRewriter()); } return new AuthenticationConfiguration(this, SET_PRINCIPAL_RW, principalRewriter.andThen(rewriter.asPrincipalRewriter())); }
/** * Sets a pre-realm name rewriter, which rewrites the authentication name before a realm is selected. * * @param rewriter the name rewriter (must not be {@code null}) * @return this builder */ public Builder setPreRealmRewriter(NameRewriter rewriter) { return setPreRealmRewriter(rewriter.asPrincipalRewriter()); }
/** * Sets a post-realm name rewriter, which rewrites the authentication name after a realm is selected. * * @param rewriter the name rewriter (must not be {@code null}) * @return this builder */ public Builder setPostRealmRewriter(NameRewriter rewriter) { return setPostRealmRewriter(rewriter.asPrincipalRewriter()); }
/** * Sets a post-realm name rewriter, which rewrites the authentication name after a realm is selected. * * @param rewriter the name rewriter (must not be {@code null}) * @return this builder */ public Builder setPostRealmRewriter(NameRewriter rewriter) { return setPostRealmRewriter(rewriter.asPrincipalRewriter()); }
/** * Sets a pre-realm name rewriter, which rewrites the authentication name before a realm is selected. * * @param rewriter the name rewriter (must not be {@code null}) * @return this builder */ public Builder setPreRealmRewriter(NameRewriter rewriter) { return setPreRealmRewriter(rewriter.asPrincipalRewriter()); }
@Deprecated public RealmBuilder setNameRewriter(final NameRewriter nameRewriter) { return setPrincipalRewriter(nameRewriter.asPrincipalRewriter()); }
/** * Sets a post-realm name rewriter, which rewrites the authentication name after a realm is selected. * * @param rewriter the name rewriter (must not be {@code null}) * @return this builder */ public Builder setPostRealmRewriter(NameRewriter rewriter) { return setPostRealmRewriter(rewriter.asPrincipalRewriter()); }
/** * Sets a pre-realm name rewriter, which rewrites the authentication name before a realm is selected. * * @param rewriter the name rewriter (must not be {@code null}) * @return this builder */ public Builder setPreRealmRewriter(NameRewriter rewriter) { return setPreRealmRewriter(rewriter.asPrincipalRewriter()); }
/** * Create a new configuration which is the same as this configuration, but rewrites the user name using <em>only</em> * the given name rewriter. Any name rewriters on this configuration are ignored for the new configuration. * * @param rewriter the name rewriter * @return the new configuration */ public AuthenticationConfiguration rewriteUserOnlyWith(NameRewriter rewriter) { if (rewriter == null) { return this; } return new AuthenticationConfiguration(this, SET_PRINCIPAL_RW, rewriter.asPrincipalRewriter()); }
/** * Create a new configuration which is the same as this configuration, but rewrites the user name using <em>only</em> * the given name rewriter. Any name rewriters on this configuration are ignored for the new configuration. * * @param rewriter the name rewriter * @return the new configuration */ public AuthenticationConfiguration rewriteUserOnlyWith(NameRewriter rewriter) { if (rewriter == null) { return this; } return new AuthenticationConfiguration(this, SET_PRINCIPAL_RW, rewriter.asPrincipalRewriter()); }
@Deprecated public RealmBuilder setNameRewriter(final NameRewriter nameRewriter) { return setPrincipalRewriter(nameRewriter.asPrincipalRewriter()); }
@Deprecated public RealmBuilder setNameRewriter(final NameRewriter nameRewriter) { return setPrincipalRewriter(nameRewriter.asPrincipalRewriter()); }
/** * Create a new configuration which is the same as this configuration, but rewrites the user name using <em>only</em> * the given name rewriter. Any name rewriters on this configuration are ignored for the new configuration. * * @param rewriter the name rewriter * @return the new configuration */ public AuthenticationConfiguration rewriteUserOnlyWith(NameRewriter rewriter) { if (rewriter == null) { return this; } return new AuthenticationConfiguration(this, SET_PRINCIPAL_RW, rewriter.asPrincipalRewriter()); }
/** * Create a new configuration which is the same as this configuration, but rewrites the user name using the given * name rewriter. The name rewriter is appended to the the existing name rewrite function. * * @param rewriter the name rewriter * @return the new configuration */ public AuthenticationConfiguration rewriteUser(NameRewriter rewriter) { if (rewriter == null) { return this; } if (this.principalRewriter == null) { return new AuthenticationConfiguration(this, SET_PRINCIPAL_RW, rewriter.asPrincipalRewriter()); } return new AuthenticationConfiguration(this, SET_PRINCIPAL_RW, principalRewriter.andThen(rewriter.asPrincipalRewriter())); }
/** * Create a new configuration which is the same as this configuration, but rewrites the user name using the given * name rewriter. The name rewriter is appended to the the existing name rewrite function. * * @param rewriter the name rewriter * @return the new configuration */ public AuthenticationConfiguration rewriteUser(NameRewriter rewriter) { if (rewriter == null) { return this; } if (this.principalRewriter == null) { return new AuthenticationConfiguration(this, SET_PRINCIPAL_RW, rewriter.asPrincipalRewriter()); } return new AuthenticationConfiguration(this, SET_PRINCIPAL_RW, principalRewriter.andThen(rewriter.asPrincipalRewriter())); }
/** * Create a new configuration which is the same as this configuration, but rewrites the user name using the given * name rewriter. The name rewriter is appended to the the existing name rewrite function. * * @param rewriter the name rewriter * @return the new configuration */ public AuthenticationConfiguration rewriteUser(NameRewriter rewriter) { if (rewriter == null) { return this; } if (this.principalRewriter == null) { return new AuthenticationConfiguration(this, SET_PRINCIPAL_RW, rewriter.asPrincipalRewriter()); } return new AuthenticationConfiguration(this, SET_PRINCIPAL_RW, principalRewriter.andThen(rewriter.asPrincipalRewriter())); }