Search in sources :

Example 1 with Url

use of com.evolveum.midpoint.authentication.api.authorization.Url in project midpoint by Evolveum.

the class DescriptorLoaderImpl method foreachUrl.

private void foreachUrl(PageDescriptor descriptor, Consumer<String> urlConsumer) {
    for (Url url : descriptor.urls()) {
        String urlForSecurity = url.matchUrlForSecurity();
        if (StringUtils.isEmpty(urlForSecurity)) {
            urlForSecurity = buildPrefixUrl(url.mountUrl());
        }
        urlConsumer.accept(urlForSecurity);
    }
}
Also used : Url(com.evolveum.midpoint.authentication.api.authorization.Url)

Example 2 with Url

use of com.evolveum.midpoint.authentication.api.authorization.Url in project midpoint by Evolveum.

the class PageMounter method mountPage.

private void mountPage(PageDescriptor descriptor, Class clazz, MidPointApplication application) throws InstantiationException, IllegalAccessException {
    for (Url url : descriptor.urls()) {
        IPageParametersEncoder encoder = descriptor.encoder().newInstance();
        LOGGER.trace("Mounting page '{}' to url '{}' with encoder '{}'.", clazz.getName(), url, encoder.getClass().getSimpleName());
        application.mount(new ExactMatchMountedMapper(url.mountUrl(), clazz, encoder));
        urlClassMap.put(url.mountUrl(), clazz);
    }
}
Also used : IPageParametersEncoder(org.apache.wicket.request.mapper.parameter.IPageParametersEncoder) ExactMatchMountedMapper(com.evolveum.midpoint.web.util.ExactMatchMountedMapper) Url(com.evolveum.midpoint.authentication.api.authorization.Url)

Aggregations

Url (com.evolveum.midpoint.authentication.api.authorization.Url)2 ExactMatchMountedMapper (com.evolveum.midpoint.web.util.ExactMatchMountedMapper)1 IPageParametersEncoder (org.apache.wicket.request.mapper.parameter.IPageParametersEncoder)1