package org.opendaylight.aaa.web;
/**
- * Secures a {@link WebContextBuilder}.
+ * Secures a {@link WebContext.Builder}.
*
* @author Michael Vorburger.ch
*/
public interface WebContextSecurer {
/**
- * Configures the WebContext in an implementation specific manner so that it requires authentication to access the
+ * Configure the WebContext to require auth for specified URLs.
+ *
+ * <p>
+ * Configure the WebContext so that it requires authentication to access the
* given URL Patterns. Typically, this will be done by adding a {@code javax.servlet.Filter} (or several, and
* whatever else they need).
*
* @param asyncSupported true if asynchronous communication should also be supported
* @param urlPatterns URL patterns that require authentication
*/
- void requireAuthentication(WebContextBuilder webContextBuilder, boolean asyncSupported, String... urlPatterns);
+ void requireAuthentication(WebContext.Builder webContextBuilder, boolean asyncSupported, String... urlPatterns);
/**
- * Configures the WebContext in an implementation specific manner so that it requires authentication to access the
+ * Configure the WebContext to require auth for specified URLs.
+ *
+ * <p>
+ * Configures the WebContext so that it requires authentication to access the
* given URL Patterns. Typically, this will be done by adding a {@code javax.servlet.Filter} (or several, and
* whatever else they need).
*
* <p>
* This method is equivalent to {@code requireAuthentication(webContextBuilder, false, urlPatterns}.
+ *
+ * @param webContextBuilder builder to secure
+ * @param urlPatterns URL patterns that require authentication
*/
- default void requireAuthentication(final WebContextBuilder webContextBuilder, final String... urlPatterns) {
+ default void requireAuthentication(final WebContext.Builder webContextBuilder, final String... urlPatterns) {
requireAuthentication(webContextBuilder, false, urlPatterns);
}
/**
+ * Configure the WebContext to require auth all URLs.
+ *
+ * <p>
* Configures the WebContext so that all its URL patterns ({@code/**}) require authentication.
- * @see #requireAuthentication(WebContextBuilder, String...)
+ *
+ * @param webContextBuilder builder to secure
+ * @see #requireAuthentication(WebContext.Builder, String...)
*/
- default void requireAuthentication(final WebContextBuilder webContextBuilder) {
+ default void requireAuthentication(final WebContext.Builder webContextBuilder) {
requireAuthentication(webContextBuilder, "/*");
}
}