[SYNCOPE-1035] Adding support for Admin Console
Project: http://git-wip-us.apache.org/repos/asf/syncope/repo Commit: http://git-wip-us.apache.org/repos/asf/syncope/commit/7004b84a Tree: http://git-wip-us.apache.org/repos/asf/syncope/tree/7004b84a Diff: http://git-wip-us.apache.org/repos/asf/syncope/diff/7004b84a Branch: refs/heads/master Commit: 7004b84a150f456044e95ac5c83edfa8f8db9c59 Parents: 5cfb727 Author: Francesco Chicchiriccò <[email protected]> Authored: Fri Mar 3 10:04:26 2017 +0100 Committer: Francesco Chicchiriccò <[email protected]> Committed: Fri Mar 3 10:04:38 2017 +0100 ---------------------------------------------------------------------- client/console/pom.xml | 5 + .../client/console/commons/Constants.java | 2 + .../console/commons/RoleDataProvider.java | 58 ----- .../syncope/client/console/pages/Dashboard.java | 13 +- .../panels/AccessTokenDirectoryPanel.java | 234 +++++++++++++++++++ .../panels/DashboardAccessTokensPanel.java | 46 ++++ .../console/panels/RoleDirectoryPanel.java | 38 ++- .../console/rest/AccessTokenRestClient.java | 50 ++++ .../client/console/rest/RoleRestClient.java | 2 +- .../tasks/NotificationTaskDirectoryPanel.java | 2 +- .../console/tasks/SchedTaskDirectoryPanel.java | 2 +- .../console/tasks/TaskDirectoryPanel.java | 2 +- .../client/console/pages/Dashboard.properties | 1 + .../console/pages/Dashboard_it.properties | 1 + .../console/pages/Dashboard_pt_BR.properties | 1 + .../console/pages/Dashboard_ru.properties | 5 +- .../panels/AccessTokenDirectoryPanel.properties | 22 ++ .../AccessTokenDirectoryPanel_it.properties | 22 ++ .../AccessTokenDirectoryPanel_pt_BR.properties | 22 ++ .../AccessTokenDirectoryPanel_ru.properties | 23 ++ .../syncope/client/console/panels/AnyPanel.html | 11 +- .../panels/DashboardAccessTokensPanel.html | 23 ++ .../client/enduser/SyncopeEnduserSession.java | 10 +- .../client/lib/JWTAuthenticationHandler.java | 4 +- .../syncope/common/lib/to/AccessTokenTO.java | 10 - .../SyncopeDigestAuthenticationEntryPoint.java | 43 ---- 26 files changed, 521 insertions(+), 131 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/pom.xml ---------------------------------------------------------------------- diff --git a/client/console/pom.xml b/client/console/pom.xml index 8898a01..f8ec4dc 100644 --- a/client/console/pom.xml +++ b/client/console/pom.xml @@ -106,6 +106,11 @@ under the License. </dependency> <dependency> + <groupId>org.apache.cxf</groupId> + <artifactId>cxf-rt-rs-security-jose</artifactId> + </dependency> + + <dependency> <groupId>org.apache.pdfbox</groupId> <artifactId>pdfbox</artifactId> </dependency> http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java index 7ac304d..70fb8ca 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/commons/Constants.java @@ -99,6 +99,8 @@ public final class Constants { public static final String PREF_ROLE_PAGINATOR_ROWS = "role.paginator.rows"; + public static final String PREF_ACCESS_TOKEN_PAGINATOR_ROWS = "accessToken.paginator.rows"; + public static final String PREF_WORKFLOW_FORM_PAGINATOR_ROWS = "role.paginator.workflow.form"; public static final String PREF_RESOURCES_PAGINATOR_ROWS = "resources.paginator.rows"; http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/java/org/apache/syncope/client/console/commons/RoleDataProvider.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/commons/RoleDataProvider.java b/client/console/src/main/java/org/apache/syncope/client/console/commons/RoleDataProvider.java deleted file mode 100644 index e2b1582..0000000 --- a/client/console/src/main/java/org/apache/syncope/client/console/commons/RoleDataProvider.java +++ /dev/null @@ -1,58 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.syncope.client.console.commons; - -import java.util.Collections; -import java.util.Iterator; -import java.util.List; -import org.apache.syncope.client.console.rest.RoleRestClient; -import org.apache.syncope.common.lib.to.RoleTO; -import org.apache.wicket.model.CompoundPropertyModel; -import org.apache.wicket.model.IModel; - -public class RoleDataProvider extends DirectoryDataProvider<RoleTO> { - - private static final long serialVersionUID = 6267494272884913376L; - - private final SortableDataProviderComparator<RoleTO> comparator; - - private final RoleRestClient restClient = new RoleRestClient(); - - public RoleDataProvider(final int paginatorRows) { - super(paginatorRows); - this.comparator = new SortableDataProviderComparator<>(this); - } - - @Override - public Iterator<RoleTO> iterator(final long first, final long count) { - List<RoleTO> result = restClient.list(); - Collections.sort(result, comparator); - return result.subList((int) first, (int) first + (int) count).iterator(); - } - - @Override - public long size() { - return restClient.count(); - } - - @Override - public IModel<RoleTO> model(final RoleTO object) { - return new CompoundPropertyModel<>(object); - } -} http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/java/org/apache/syncope/client/console/pages/Dashboard.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/pages/Dashboard.java b/client/console/src/main/java/org/apache/syncope/client/console/pages/Dashboard.java index 50a7ae8..eb27288 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/pages/Dashboard.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/pages/Dashboard.java @@ -24,6 +24,7 @@ import java.util.List; import org.apache.syncope.client.console.SyncopeConsoleApplication; import org.apache.syncope.client.console.init.ClassPathScanImplementationLookup; import org.apache.syncope.client.console.init.ConsoleInitializer; +import org.apache.syncope.client.console.panels.DashboardAccessTokensPanel; import org.apache.syncope.client.console.panels.DashboardControlPanel; import org.apache.syncope.client.console.panels.DashboardExtensionsPanel; import org.apache.syncope.client.console.panels.DashboardOverviewPanel; @@ -61,6 +62,16 @@ public class Dashboard extends BasePage { } }); + tabs.add(new AbstractTab(new ResourceModel("accessTokens")) { + + private static final long serialVersionUID = -6815067322125799251L; + + @Override + public Panel getPanel(final String panelId) { + return new DashboardAccessTokensPanel(panelId, getPageReference()); + } + }); + tabs.add(new AbstractTab(new ResourceModel("control")) { private static final long serialVersionUID = -6815067322125799251L; @@ -73,7 +84,7 @@ public class Dashboard extends BasePage { ClassPathScanImplementationLookup classPathScanImplementationLookup = (ClassPathScanImplementationLookup) SyncopeConsoleApplication.get(). - getServletContext().getAttribute(ConsoleInitializer.CLASSPATH_LOOKUP); + getServletContext().getAttribute(ConsoleInitializer.CLASSPATH_LOOKUP); final List<Class<? extends BaseExtWidget>> extWidgetClasses = classPathScanImplementationLookup.getExtWidgetClasses(); if (!extWidgetClasses.isEmpty()) { http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/java/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.java new file mode 100644 index 0000000..5b08c29 --- /dev/null +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.java @@ -0,0 +1,234 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.client.console.panels; + +import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.Date; +import java.util.Iterator; +import java.util.List; +import org.apache.commons.lang3.StringUtils; +import org.apache.cxf.rs.security.jose.jws.JwsJwtCompactConsumer; +import org.apache.syncope.client.console.SyncopeConsoleSession; +import org.apache.syncope.client.console.commons.Constants; +import org.apache.syncope.client.console.commons.DirectoryDataProvider; +import org.apache.syncope.client.console.commons.SortableDataProviderComparator; +import org.apache.syncope.client.console.pages.BasePage; +import org.apache.syncope.client.console.panels.AccessTokenDirectoryPanel.AccessTokenDataProvider; +import org.apache.syncope.client.console.rest.AccessTokenRestClient; +import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.ActionColumn; +import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.DatePropertyColumn; +import org.apache.syncope.client.console.wicket.extensions.markup.html.repeater.data.table.KeyPropertyColumn; +import org.apache.syncope.client.console.wicket.markup.html.form.ActionLink; +import org.apache.syncope.client.console.wicket.markup.html.form.ActionLinksPanel; +import org.apache.syncope.client.console.wizards.WizardMgtPanel; +import org.apache.syncope.common.lib.SyncopeClientException; +import org.apache.syncope.common.lib.SyncopeConstants; +import org.apache.syncope.common.lib.to.AccessTokenTO; +import org.apache.syncope.common.lib.types.StandardEntitlement; +import org.apache.wicket.PageReference; +import org.apache.wicket.ajax.AjaxRequestTarget; +import org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator; +import org.apache.wicket.extensions.markup.html.repeater.data.sort.SortOrder; +import org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn; +import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; +import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn; +import org.apache.wicket.markup.html.basic.Label; +import org.apache.wicket.markup.repeater.Item; +import org.apache.wicket.model.CompoundPropertyModel; +import org.apache.wicket.model.IModel; +import org.apache.wicket.model.ResourceModel; + +public class AccessTokenDirectoryPanel + extends DirectoryPanel<AccessTokenTO, AccessTokenTO, AccessTokenDataProvider, AccessTokenRestClient> { + + private static final long serialVersionUID = -6903586269155682961L; + + protected AccessTokenDirectoryPanel(final String id, final Builder builder) { + super(id, builder); + + setShowResultPage(true); + + modal.size(Modal.Size.Large); + initResultTable(); + } + + @Override + protected AccessTokenDataProvider dataProvider() { + return new AccessTokenDataProvider(rows); + } + + @Override + protected String paginatorRowsKey() { + return Constants.PREF_ACCESS_TOKEN_PAGINATOR_ROWS; + } + + @Override + protected List<IColumn<AccessTokenTO, String>> getColumns() { + List<IColumn<AccessTokenTO, String>> columns = new ArrayList<>(); + + columns.add(new KeyPropertyColumn<AccessTokenTO>(new ResourceModel("key"), "key", "key")); + + columns.add(new PropertyColumn<AccessTokenTO, String>(new ResourceModel("owner"), "owner", "owner")); + + columns.add(new AbstractColumn<AccessTokenTO, String>(new ResourceModel("issuedAt", "")) { + + private static final long serialVersionUID = -1822504503325964706L; + + @Override + public void populateItem( + final Item<ICellPopulator<AccessTokenTO>> cellItem, + final String componentId, + final IModel<AccessTokenTO> model) { + + JwsJwtCompactConsumer consumer = new JwsJwtCompactConsumer(model.getObject().getBody()); + cellItem.add(new Label(componentId, + SyncopeConsoleSession.get().getDateFormat().format( + new Date(consumer.getJwtClaims().getIssuedAt())))); + } + }); + + columns.add(new DatePropertyColumn<AccessTokenTO>(new ResourceModel("expiryTime"), "expiryTime", "expiryTime")); + + columns.add(new AbstractColumn<AccessTokenTO, String>(new ResourceModel("remoteHost", "")) { + + private static final long serialVersionUID = -1822504503325964706L; + + @Override + public void populateItem( + final Item<ICellPopulator<AccessTokenTO>> cellItem, + final String componentId, + final IModel<AccessTokenTO> model) { + + JwsJwtCompactConsumer consumer = new JwsJwtCompactConsumer(model.getObject().getBody()); + cellItem.add(new Label(componentId, + consumer.getJwtClaims().getClaim(SyncopeConstants.JWT_CLAIM_REMOTE_HOST).toString())); + } + }); + + columns.add(new ActionColumn<AccessTokenTO, String>(new ResourceModel("actions", "")) { + + private static final long serialVersionUID = 6532399418012695495L; + + @Override + public ActionLinksPanel<AccessTokenTO> getActions( + final String componentId, final IModel<AccessTokenTO> model) { + + final ActionLinksPanel.Builder<AccessTokenTO> panel = ActionLinksPanel.builder(); + + panel.add(new ActionLink<AccessTokenTO>() { + + private static final long serialVersionUID = -7978723352517770644L; + + @Override + public void onClick(final AjaxRequestTarget target, final AccessTokenTO ignore) { + try { + restClient.delete(model.getObject().getKey()); + SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); + target.add(container); + } catch (SyncopeClientException e) { + LOG.error("While deleting object {}", model.getObject().getKey(), e); + SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass(). + getName() : e.getMessage()); + } + ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); + } + }, ActionLink.ActionType.DELETE, StandardEntitlement.ACCESS_TOKEN_DELETE); + + return panel.build(componentId); + } + + @Override + public ActionLinksPanel<AccessTokenTO> getHeader(final String componentId) { + final ActionLinksPanel.Builder<AccessTokenTO> panel = ActionLinksPanel.builder(); + + return panel.add(new ActionLink<AccessTokenTO>() { + + private static final long serialVersionUID = -8766205612892810375L; + + @Override + public void onClick(final AjaxRequestTarget target, final AccessTokenTO ignore) { + if (target != null) { + target.add(container); + } + } + }, ActionLink.ActionType.RELOAD, StandardEntitlement.ACCESS_TOKEN_LIST).build(componentId); + } + }); + + return columns; + } + + @Override + protected Collection<ActionLink.ActionType> getBulkActions() { + return Collections.emptyList(); + } + + public abstract static class Builder + extends DirectoryPanel.Builder<AccessTokenTO, AccessTokenTO, AccessTokenRestClient> { + + private static final long serialVersionUID = 5088962796986706805L; + + public Builder(final PageReference pageRef) { + super(new AccessTokenRestClient(), pageRef); + } + + @Override + protected WizardMgtPanel<AccessTokenTO> newInstance(final String id, final boolean wizardInModal) { + return new AccessTokenDirectoryPanel(id, this); + } + } + + protected class AccessTokenDataProvider extends DirectoryDataProvider<AccessTokenTO> { + + private static final long serialVersionUID = 6267494272884913376L; + + private final SortableDataProviderComparator<AccessTokenTO> comparator; + + private final AccessTokenRestClient restClient = new AccessTokenRestClient(); + + public AccessTokenDataProvider(final int paginatorRows) { + super(paginatorRows); + + setSort("owner", SortOrder.ASCENDING); + this.comparator = new SortableDataProviderComparator<>(this); + } + + @Override + public Iterator<AccessTokenTO> iterator(final long first, final long count) { + int page = ((int) first / paginatorRows); + List<AccessTokenTO> tasks = restClient.list((page < 0 ? 0 : page) + 1, paginatorRows, getSort()); + + Collections.sort(tasks, comparator); + return tasks.iterator(); + } + + @Override + public long size() { + return restClient.count(); + } + + @Override + public IModel<AccessTokenTO> model(final AccessTokenTO object) { + return new CompoundPropertyModel<>(object); + } + } +} http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/java/org/apache/syncope/client/console/panels/DashboardAccessTokensPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/DashboardAccessTokensPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/DashboardAccessTokensPanel.java new file mode 100644 index 0000000..d83d9e5 --- /dev/null +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/DashboardAccessTokensPanel.java @@ -0,0 +1,46 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.client.console.panels; + +import org.apache.syncope.client.console.wizards.WizardMgtPanel; +import org.apache.syncope.common.lib.to.AccessTokenTO; +import org.apache.syncope.common.lib.types.StandardEntitlement; +import org.apache.wicket.Component; +import org.apache.wicket.PageReference; +import org.apache.wicket.authroles.authorization.strategies.role.metadata.MetaDataRoleAuthorizationStrategy; +import org.apache.wicket.markup.html.panel.Panel; + +public class DashboardAccessTokensPanel extends Panel { + + private static final long serialVersionUID = -5540744119461583586L; + + public DashboardAccessTokensPanel(final String id, final PageReference pageRef) { + super(id); + + WizardMgtPanel<AccessTokenTO> accessTokens = new AccessTokenDirectoryPanel.Builder(pageRef) { + + private static final long serialVersionUID = -5960765294082359003L; + + }.disableCheckBoxes().build("accessTokens"); + MetaDataRoleAuthorizationStrategy.authorize( + accessTokens, Component.RENDER, StandardEntitlement.ACCESS_TOKEN_LIST); + add(accessTokens); + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDirectoryPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDirectoryPanel.java index 268593c..3292147 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDirectoryPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/panels/RoleDirectoryPanel.java @@ -23,14 +23,18 @@ import de.agilecoders.wicket.core.markup.html.bootstrap.dialog.Modal; import java.io.Serializable; import java.util.ArrayList; import java.util.Collection; +import java.util.Collections; +import java.util.Iterator; import java.util.List; import org.apache.commons.lang3.SerializationUtils; import org.apache.commons.lang3.StringUtils; import org.apache.syncope.client.console.SyncopeConsoleSession; import org.apache.syncope.client.console.commons.Constants; -import org.apache.syncope.client.console.commons.RoleDataProvider; +import org.apache.syncope.client.console.commons.DirectoryDataProvider; +import org.apache.syncope.client.console.commons.SortableDataProviderComparator; import org.apache.syncope.client.console.layout.FormLayoutInfoUtils; import org.apache.syncope.client.console.pages.BasePage; +import org.apache.syncope.client.console.panels.RoleDirectoryPanel.RoleDataProvider; import org.apache.syncope.client.console.rest.AnyTypeClassRestClient; import org.apache.syncope.client.console.rest.AnyTypeRestClient; import org.apache.syncope.client.console.rest.RoleRestClient; @@ -57,6 +61,7 @@ import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; import org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn; import org.apache.wicket.markup.html.WebPage; import org.apache.wicket.markup.html.panel.Panel; +import org.apache.wicket.model.CompoundPropertyModel; import org.apache.wicket.model.IModel; import org.apache.wicket.model.ResourceModel; import org.apache.wicket.model.StringResourceModel; @@ -266,4 +271,35 @@ public class RoleDirectoryPanel extends DirectoryPanel<RoleTO, RoleWrapper, Role return new RoleDirectoryPanel(id, this); } } + + protected class RoleDataProvider extends DirectoryDataProvider<RoleTO> { + + private static final long serialVersionUID = 6267494272884913376L; + + private final SortableDataProviderComparator<RoleTO> comparator; + + private final RoleRestClient restClient = new RoleRestClient(); + + public RoleDataProvider(final int paginatorRows) { + super(paginatorRows); + this.comparator = new SortableDataProviderComparator<>(this); + } + + @Override + public Iterator<RoleTO> iterator(final long first, final long count) { + List<RoleTO> result = restClient.list(); + Collections.sort(result, comparator); + return result.subList((int) first, (int) first + (int) count).iterator(); + } + + @Override + public long size() { + return restClient.count(); + } + + @Override + public IModel<RoleTO> model(final RoleTO object) { + return new CompoundPropertyModel<>(object); + } + } } http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/java/org/apache/syncope/client/console/rest/AccessTokenRestClient.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/AccessTokenRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/AccessTokenRestClient.java new file mode 100644 index 0000000..50b917c --- /dev/null +++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/AccessTokenRestClient.java @@ -0,0 +1,50 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one + * or more contributor license agreements. See the NOTICE file + * distributed with this work for additional information + * regarding copyright ownership. The ASF licenses this file + * to you under the Apache License, Version 2.0 (the + * "License"); you may not use this file except in compliance + * with the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, + * software distributed under the License is distributed on an + * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY + * KIND, either express or implied. See the License for the + * specific language governing permissions and limitations + * under the License. + */ +package org.apache.syncope.client.console.rest; + +import java.util.List; +import org.apache.syncope.common.lib.to.AccessTokenTO; +import org.apache.syncope.common.rest.api.beans.AccessTokenQuery; +import org.apache.syncope.common.rest.api.service.AccessTokenService; +import org.apache.wicket.extensions.markup.html.repeater.util.SortParam; + +/** + * Console client for invoking Rest Access Token's services. + */ +public class AccessTokenRestClient extends BaseRestClient { + + private static final long serialVersionUID = -3161863874876938094L; + + public void delete(final String key) { + getService(AccessTokenService.class).delete(key); + } + + public int count() { + return getService(AccessTokenService.class).list( + new AccessTokenQuery.Builder().page(1).size(1).build()). + getTotalCount(); + } + + public List<AccessTokenTO> list(final int page, final int size, final SortParam<String> sort) { + return getService(AccessTokenService.class).list( + new AccessTokenQuery.Builder().page(page).size(size).orderBy(toOrderBy(sort)).build()). + getResult(); + } + +} http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/java/org/apache/syncope/client/console/rest/RoleRestClient.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/rest/RoleRestClient.java b/client/console/src/main/java/org/apache/syncope/client/console/rest/RoleRestClient.java index c5a93fb..5b7c156 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/rest/RoleRestClient.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/rest/RoleRestClient.java @@ -29,7 +29,7 @@ import org.apache.syncope.common.lib.to.RoleTO; import org.apache.syncope.common.rest.api.service.RoleService; /** - * Console client for invoking Rest Group's services. + * Console client for invoking Rest Role's services. */ public class RoleRestClient extends BaseRestClient { http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java index 1c09fe4..39e4227 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/NotificationTaskDirectoryPanel.java @@ -222,7 +222,7 @@ public abstract class NotificationTaskDirectoryPanel return Constants.PREF_PROPAGATION_TASKS_PAGINATOR_ROWS; } - public class NotificationTasksProvider extends TaskDataProvider<NotificationTaskTO> { + protected class NotificationTasksProvider extends TaskDataProvider<NotificationTaskTO> { private static final long serialVersionUID = 4725679400450513556L; http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDirectoryPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDirectoryPanel.java index 7ad6360..8b10e8d 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDirectoryPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/SchedTaskDirectoryPanel.java @@ -307,7 +307,7 @@ public abstract class SchedTaskDirectoryPanel<T extends SchedTaskTO> return new SchedTasksProvider<>(reference, TaskType.SCHEDULED, rows); } - public class SchedTasksProvider<T extends SchedTaskTO> extends TaskDataProvider<T> { + protected class SchedTasksProvider<T extends SchedTaskTO> extends TaskDataProvider<T> { private static final long serialVersionUID = 4725679400450513556L; http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskDirectoryPanel.java ---------------------------------------------------------------------- diff --git a/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskDirectoryPanel.java b/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskDirectoryPanel.java index 383807e..b7ffabd 100644 --- a/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskDirectoryPanel.java +++ b/client/console/src/main/java/org/apache/syncope/client/console/tasks/TaskDirectoryPanel.java @@ -78,7 +78,7 @@ public abstract class TaskDirectoryPanel<T extends AbstractTaskTO> super(paginatorRows); setSort("key", SortOrder.ASCENDING); - comparator = new SortableDataProviderComparator<>(this); + this.comparator = new SortableDataProviderComparator<>(this); this.id = id; } http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard.properties index d736c6d..b9100c3 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard.properties @@ -16,3 +16,4 @@ # under the License. overview=Overview control=Control +accessTokens=Access Tokens http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_it.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_it.properties index c35799a..efdaee4 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_it.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_it.properties @@ -16,3 +16,4 @@ # under the License. overview=Sommario control=Gestione +accessTokens=Token di accesso http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_pt_BR.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_pt_BR.properties index a104327..5823cf9 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_pt_BR.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_pt_BR.properties @@ -16,3 +16,4 @@ # under the License. overview=Resumo control=Gest\u00e3o +accessTokens=Tokens de acesso http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_ru.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_ru.properties b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_ru.properties index 9ec6228..fc2c865 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_ru.properties +++ b/client/console/src/main/resources/org/apache/syncope/client/console/pages/Dashboard_ru.properties @@ -15,7 +15,8 @@ # specific language governing permissions and limitations # under the License. # -# overview=ÐÐ±Ð·Ð¾Ñ +# overview=\u00d0\u009e\u00d0\u00b1\u00d0\u00b7\u00d0\u00be\u00d1\u0080 overview=\u041e\u0431\u0437\u043e\u0440 -# control=УпÑавление +# control=\u00d0\u00a3\u00d0\u00bf\u00d1\u0080\u00d0\u00b0\u00d0\u00b2\u00d0\u00bb\u00d0\u00b5\u00d0\u00bd\u00d0\u00b8\u00d0\u00b5 control=\u0423\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u0435 +accessTokens=\u0442\u043e\u043a\u0435\u043d\u043e\u0432 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.properties new file mode 100644 index 0000000..89b23f2 --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +any.edit=Edit access token ${accessTokenTO.owner} +any.new=New access token +owner=Owner +expiryTime=Expiry +issuedAt=Start +remoteHost=Remote Host http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_it.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_it.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_it.properties new file mode 100644 index 0000000..cfda8cc --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_it.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +any.edit=Modifica ruolo ${roleTO.key} +any.new=Nuovo token di accesso +owner=Proprietario +expiryTime=Termine +issuedAt=Inizio +remoteHost=Host remoto http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_pt_BR.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_pt_BR.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_pt_BR.properties new file mode 100644 index 0000000..bd27aea --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_pt_BR.properties @@ -0,0 +1,22 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +any.edit=Alterar fun\u00e7\u00e3o ${roleTO.key} +any.new=Novo token de acesso +owner=Propriet\u00e1rio +expiryTime=Termo +issuedAt=Iniciar +remoteHost=Host remoto http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_ru.properties ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_ru.properties b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_ru.properties new file mode 100644 index 0000000..e5bbbd0 --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AccessTokenDirectoryPanel_ru.properties @@ -0,0 +1,23 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +# +any.edit=\u0418\u0437\u043c\u0435\u043d\u0438\u0442\u044c \u0440\u043e\u043b\u044c ${roleTO.key} +any.new=\u041d\u043e\u0432\u044b\u0439 \u043c\u0430\u0440\u043a\u0435\u0440 \u0434\u043e\u0441\u0442\u0443\u043f\u0430 +owner=\u0412\u043b\u0430\u0434\u0435\u043b\u0435\u0446 +expiryTime=\u0438\u0441\u0442\u0435\u0447\u0435\u043d\u0438\u0435 \u0441\u0440\u043e\u043a\u0430 +issuedAt=\u041d\u0430\u0447\u0430\u043b\u043e +remoteHost=\u0423\u0434\u0430\u043b\u0435\u043d\u043d\u044b\u0439 \u0443\u0437\u0435\u043b http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyPanel.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyPanel.html index 3445d04..26ece08 100644 --- a/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyPanel.html +++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/AnyPanel.html @@ -17,11 +17,8 @@ specific language governing permissions and limitations under the License. --> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org"> - <head><title></title></head> - <body> - <wicket:panel> - <div wicket:id="accordionPanel"></div> - <div wicket:id="searchResult"></div> - </wicket:panel> - </body> + <wicket:panel> + <div wicket:id="accordionPanel"></div> + <div wicket:id="searchResult"></div> + </wicket:panel> </html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/console/src/main/resources/org/apache/syncope/client/console/panels/DashboardAccessTokensPanel.html ---------------------------------------------------------------------- diff --git a/client/console/src/main/resources/org/apache/syncope/client/console/panels/DashboardAccessTokensPanel.html b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DashboardAccessTokensPanel.html new file mode 100644 index 0000000..4c317fe --- /dev/null +++ b/client/console/src/main/resources/org/apache/syncope/client/console/panels/DashboardAccessTokensPanel.html @@ -0,0 +1,23 @@ +<!-- +Licensed to the Apache Software Foundation (ASF) under one +or more contributor license agreements. See the NOTICE file +distributed with this work for additional information +regarding copyright ownership. The ASF licenses this file +to you under the Apache License, Version 2.0 (the +"License"); you may not use this file except in compliance +with the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, +software distributed under the License is distributed on an +"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +KIND, either express or implied. See the License for the +specific language governing permissions and limitations +under the License. +--> +<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org"> + <wicket:panel> + <div wicket:id="accessTokens"></div> + </wicket:panel> +</html> \ No newline at end of file http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserSession.java ---------------------------------------------------------------------- diff --git a/client/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserSession.java b/client/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserSession.java index 741d40c..2d556ee 100644 --- a/client/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserSession.java +++ b/client/enduser/src/main/java/org/apache/syncope/client/enduser/SyncopeEnduserSession.java @@ -145,7 +145,7 @@ public class SyncopeEnduserSession extends WebSession { } public boolean isAuthenticated() { - return client.getJWT() != null; + return client != null && client.getJWT() != null; } public CookieUtils getCookieUtils() { @@ -162,13 +162,17 @@ public class SyncopeEnduserSession extends WebSession { @Override public void invalidate() { - client.logout(); + if (isAuthenticated()) { + client.logout(); + } super.invalidate(); } @Override public void invalidateNow() { - client.logout(); + if (isAuthenticated()) { + client.logout(); + } super.invalidateNow(); } http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/client/lib/src/main/java/org/apache/syncope/client/lib/JWTAuthenticationHandler.java ---------------------------------------------------------------------- diff --git a/client/lib/src/main/java/org/apache/syncope/client/lib/JWTAuthenticationHandler.java b/client/lib/src/main/java/org/apache/syncope/client/lib/JWTAuthenticationHandler.java index b13ec2e..1a3af4c 100644 --- a/client/lib/src/main/java/org/apache/syncope/client/lib/JWTAuthenticationHandler.java +++ b/client/lib/src/main/java/org/apache/syncope/client/lib/JWTAuthenticationHandler.java @@ -25,8 +25,8 @@ public class JWTAuthenticationHandler implements AuthenticationHandler { private final String jwt; - public JWTAuthenticationHandler(final String jwtToken) { - this.jwt = jwtToken; + public JWTAuthenticationHandler(final String jwt) { + this.jwt = jwt; } public String getJwt() { http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AccessTokenTO.java ---------------------------------------------------------------------- diff --git a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AccessTokenTO.java b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AccessTokenTO.java index c172e88..a07ef4e 100644 --- a/common/lib/src/main/java/org/apache/syncope/common/lib/to/AccessTokenTO.java +++ b/common/lib/src/main/java/org/apache/syncope/common/lib/to/AccessTokenTO.java @@ -37,8 +37,6 @@ public class AccessTokenTO extends AbstractBaseBean implements EntityTO { private String owner; - private String authorities; - @Override public String getKey() { return key; @@ -77,12 +75,4 @@ public class AccessTokenTO extends AbstractBaseBean implements EntityTO { this.owner = owner; } - public String getAuthorities() { - return authorities; - } - - public void setAuthorities(final String authorities) { - this.authorities = authorities; - } - } http://git-wip-us.apache.org/repos/asf/syncope/blob/7004b84a/core/spring/src/main/java/org/apache/syncope/core/spring/security/SyncopeDigestAuthenticationEntryPoint.java ---------------------------------------------------------------------- diff --git a/core/spring/src/main/java/org/apache/syncope/core/spring/security/SyncopeDigestAuthenticationEntryPoint.java b/core/spring/src/main/java/org/apache/syncope/core/spring/security/SyncopeDigestAuthenticationEntryPoint.java deleted file mode 100644 index 79b33c5..0000000 --- a/core/spring/src/main/java/org/apache/syncope/core/spring/security/SyncopeDigestAuthenticationEntryPoint.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * Licensed to the Apache Software Foundation (ASF) under one - * or more contributor license agreements. See the NOTICE file - * distributed with this work for additional information - * regarding copyright ownership. The ASF licenses this file - * to you under the Apache License, Version 2.0 (the - * "License"); you may not use this file except in compliance - * with the License. You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -package org.apache.syncope.core.spring.security; - -import java.io.IOException; -import javax.servlet.ServletException; -import javax.servlet.http.HttpServletRequest; -import javax.servlet.http.HttpServletResponse; -import org.apache.syncope.common.rest.api.RESTHeaders; -import org.springframework.security.core.AuthenticationException; -import org.springframework.security.web.authentication.www.DigestAuthenticationEntryPoint; - -/** - * Render Spring's {@link AuthenticationException} as other Syncope errors. - */ -public class SyncopeDigestAuthenticationEntryPoint extends DigestAuthenticationEntryPoint { - - @Override - public void commence(final HttpServletRequest request, final HttpServletResponse response, - final AuthenticationException authException) throws IOException, ServletException { - - response.addHeader(RESTHeaders.ERROR_INFO, authException.getMessage()); - - super.commence(request, response, authException); - } - -}
