/*
* #%L
* BroadleafCommerce Open Admin Platform
* %%
* Copyright (C) 2009 - 2015 Broadleaf Commerce
* %%
* Licensed 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.
* #L%
*/
package org.broadleafcommerce.openadmin.server.security.external;
import org.broadleafcommerce.common.extension.ExtensionHandler;
import org.broadleafcommerce.common.extension.ExtensionResultStatusType;
import org.broadleafcommerce.common.security.BroadleafExternalAuthenticationUserDetails;
import org.broadleafcommerce.openadmin.server.security.domain.AdminUser;
public interface AdminExternalLoginExtensionHandler extends ExtensionHandler {
/**
* This can be used to associate, for example, Site to the adminUser, or to validate that the Site that the adminUser
* has access to is the current site. Implementors may also wish to assign additional data to the admin user, persist
* custom data, validate additional access rules, etc.
* Implementors should not persist the adminUser object. Rather modify or augment the state of the adminUser object
* only. Persistence should be handled outside of this.
*
* If an implementor decides that the user is not actually authenticated or should not be allowed access, an instance of
* <code>org.springframework.security.core.AuthenticationException</code> should be thrown.
*
* @param adminUser
* @param details
* @return
*/
public ExtensionResultStatusType performAdditionalAuthenticationTasks(
AdminUser adminUser, BroadleafExternalAuthenticationUserDetails details);
}