All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.vaadin.spring.security.shared.VaadinAuthenticationSuccessHandler Maven / Gradle / Ivy

/*
 * Copyright 2015, 2016 The original authors
 *
 * 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.
 */
package org.vaadin.spring.security.shared;

import org.springframework.security.core.Authentication;

/**
 * Strategy used to handle a successful user authentication.
 * 

* Implementations can do whatever they want but typical behaviour would be to control the navigation to the * subsequent destination (using a redirect or a forward). For example, after a user has logged in by submitting a * login form, the application needs to decide where they should be redirected to afterwards. * Other logic may also be included if required. *

* Vaadin Specific Strategy of {@link org.springframework.security.web.authentication.AuthenticationSuccessHandler} * * @author Gert-Jan Timmer ([email protected]) * @author Petter Holmström ([email protected]) */ public interface VaadinAuthenticationSuccessHandler { /** * Called when a user has been successfully authenticated. * * @param authentication the Authentication object which was created during the authentication process. */ void onAuthenticationSuccess(Authentication authentication) throws Exception; /** * Implementation of {@link VaadinAuthenticationSuccessHandler} that does nothing. */ final class NullHandler implements VaadinAuthenticationSuccessHandler { @Override public void onAuthenticationSuccess(Authentication authentication) throws Exception { } } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy