/** * Get a new authentication context which is the same as this one, but which includes the given rule and SSL context at * the end of its SSL context list. * * @param rule the rule to match * @param sslContext the SSL context to select when the rule matches * @return the combined authentication context */ public AuthenticationContext withSsl(MatchRule rule, SecurityFactory<SSLContext> sslContext) { if (sslContext == null || rule == null) return this; return new AuthenticationContext(authRules, with(sslRules, rule, sslContext)); }
/** * Get a new authentication context which is the same as this one, but without the rule and configuration at the index * indicated by the {@code idx} parameter. * * @param idx the index at which removal should be done * @return the modified authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext withoutSsl(int idx) throws IndexOutOfBoundsException { return new AuthenticationContext(authRules, without(sslRules, idx)); }
/** * Get a new authentication context which is the same as this one, but which includes the given rule and configuration at * the end of its list. * * @param rule the rule to match * @param configuration the configuration to select when the rule matches * @return the combined authentication context */ public AuthenticationContext with(MatchRule rule, AuthenticationConfiguration configuration) { if (configuration == null || rule == null) return this; return new AuthenticationContext(with(authRules, rule, configuration), sslRules); }
/** * Get a new authentication context which is the same as this one, but without the rule and configuration at the index * indicated by the {@code idx} parameter. * * @param idx the index at which removal should be done * @return the modified authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext without(int idx) throws IndexOutOfBoundsException { return new AuthenticationContext(without(authRules, idx), sslRules); }
/** * Get a new authentication context which is the same as this one, but which includes the given rule and SSL context * inserted at the position of its list indicated by the {@code idx} parameter. * * @param idx the index at which insertion should be done * @param rule the rule to match * @param sslContext the SSL context to select when the rule matches * @return the combined authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext withSsl(int idx, MatchRule rule, SecurityFactory<SSLContext> sslContext) throws IndexOutOfBoundsException { if (sslContext == null || rule == null) return this; return new AuthenticationContext(authRules, with(sslRules, rule, sslContext, idx)); }
/** * Get a new authentication context which is the same as this one, but which includes the given rule and configuration * inserted at the position of its list indicated by the {@code idx} parameter. * * @param idx the index at which insertion should be done * @param rule the rule to match * @param configuration the configuration to select when the rule matches * @return the combined authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext with(int idx, MatchRule rule, AuthenticationConfiguration configuration) throws IndexOutOfBoundsException { if (configuration == null || rule == null) return this; return new AuthenticationContext(with(authRules, rule, configuration, idx), sslRules); }
/** * Get a new authentication context which is the same as this one, but which replaces the rule and configuration at the given * index with the given rule and configuration. * * @param idx the index at which insertion should be done * @param rule the rule to match * @param configuration the configuration to select when the rule matches * @return the combined authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext replacing(int idx, MatchRule rule, AuthenticationConfiguration configuration) throws IndexOutOfBoundsException { if (configuration == null || rule == null) return this; return new AuthenticationContext(replacing(authRules, rule, configuration, idx), sslRules); }
/** * Get a new authentication context which is the same as this one, but which replaces the rule and SSL context at the given * index with the given rule and SSL context. * * @param idx the index at which insertion should be done * @param rule the rule to match * @param sslContext the SSL context to select when the rule matches * @return the combined authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext replacingSslContext(int idx, MatchRule rule, SecurityFactory<SSLContext> sslContext) throws IndexOutOfBoundsException { if (sslContext == null || rule == null) return this; return new AuthenticationContext(authRules, replacing(sslRules, rule, sslContext, idx)); }
/** * Get a new authentication context which is the same as this one, but which includes the rules, configurations * and SSL contexts of the given context at the end of its list. * * @param other the other authentication context * @return the combined authentication context */ public AuthenticationContext with(AuthenticationContext other) { if (other == null) return this; return new AuthenticationContext(withAll(authRules, other.authRules), withAll(sslRules, other.sslRules)); }
return () -> new AuthenticationContext(authNode, sslNode); } else { throw reader.unexpectedContent();
/** * Get a new authentication context which is the same as this one, but which includes the given rule and configuration at * the end of its list. * * @param rule the rule to match * @param configuration the configuration to select when the rule matches * @return the combined authentication context */ public AuthenticationContext with(MatchRule rule, AuthenticationConfiguration configuration) { if (configuration == null || rule == null) return this; return new AuthenticationContext(with(authRules, rule, configuration), sslRules); }
/** * Get a new authentication context which is the same as this one, but which includes the given rule and SSL context at * the end of its SSL context list. * * @param rule the rule to match * @param sslContext the SSL context to select when the rule matches * @return the combined authentication context */ public AuthenticationContext withSsl(MatchRule rule, SecurityFactory<SSLContext> sslContext) { if (sslContext == null || rule == null) return this; return new AuthenticationContext(authRules, with(sslRules, rule, sslContext)); }
/** * Get a new authentication context which is the same as this one, but without the rule and configuration at the index * indicated by the {@code idx} parameter. * * @param idx the index at which removal should be done * @return the modified authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext withoutSsl(int idx) throws IndexOutOfBoundsException { return new AuthenticationContext(authRules, without(sslRules, idx)); }
/** * Get a new authentication context which is the same as this one, but without the rule and configuration at the index * indicated by the {@code idx} parameter. * * @param idx the index at which removal should be done * @return the modified authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext without(int idx) throws IndexOutOfBoundsException { return new AuthenticationContext(without(authRules, idx), sslRules); }
/** * Get a new authentication context which is the same as this one, but without the rule and configuration at the index * indicated by the {@code idx} parameter. * * @param idx the index at which removal should be done * @return the modified authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext withoutSsl(int idx) throws IndexOutOfBoundsException { return new AuthenticationContext(authRules, without(sslRules, idx)); }
/** * Get a new authentication context which is the same as this one, but without the rule and configuration at the index * indicated by the {@code idx} parameter. * * @param idx the index at which removal should be done * @return the modified authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext withoutSsl(int idx) throws IndexOutOfBoundsException { return new AuthenticationContext(authRules, without(sslRules, idx)); }
/** * Get a new authentication context which is the same as this one, but without the rule and configuration at the index * indicated by the {@code idx} parameter. * * @param idx the index at which removal should be done * @return the modified authentication context * @throws IndexOutOfBoundsException if the index is out of bounds */ public AuthenticationContext without(int idx) throws IndexOutOfBoundsException { return new AuthenticationContext(without(authRules, idx), sslRules); }
/** * Get a new authentication context which is the same as this one, but which includes the rules, configurations * and SSL contexts of the given context at the end of its list. * * @param other the other authentication context * @return the combined authentication context */ public AuthenticationContext with(AuthenticationContext other) { if (other == null) return this; return new AuthenticationContext(withAll(authRules, other.authRules), withAll(sslRules, other.sslRules)); }
/** * Get a new authentication context which is the same as this one, but which includes the rules, configurations * and SSL contexts of the given context at the end of its list. * * @param other the other authentication context * @return the combined authentication context */ public AuthenticationContext with(AuthenticationContext other) { if (other == null) return this; return new AuthenticationContext(withAll(authRules, other.authRules), withAll(sslRules, other.sslRules)); }
/** * Get a new authentication context which is the same as this one, but which includes the rules, configurations * and SSL contexts of the given context at the end of its list. * * @param other the other authentication context * @return the combined authentication context */ public AuthenticationContext with(AuthenticationContext other) { if (other == null) return this; return new AuthenticationContext(withAll(authRules, other.authRules), withAll(sslRules, other.sslRules)); }