// Path: src/main/java/org/osiam/addons/administration/model/session/GeneralSessionData.java
// @Component
// @Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS)
// public class GeneralSessionData implements Serializable {
// 
//     private static final long serialVersionUID = 3937661507313495926L;
// 
//     private AccessToken accesstoken;
// 
//     public AccessToken getAccessToken() {
//         return accesstoken;
//     }
// 
//     public void setAccessToken(AccessToken accessToken) {
//         this.accesstoken = accessToken;
//     }
// }


import java.io.IOException;
import javax.inject.Inject;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.osiam.addons.administration.model.session.GeneralSessionData;
import org.osiam.addons.administration.util.RedirectBuilder;
import org.osiam.client.exception.UnauthorizedException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;
import com.google.common.base.Throwables;
package org.osiam.addons.administration.controller;





/**
 * This class is responsible for handling all exceptions thrown by any controller-handler.
 */
@ControllerAdvice
public class GlobalExceptionHandler implements AccessDeniedHandler {
    private static final Logger LOG = LoggerFactory.getLogger(GlobalExceptionHandler.class);

    @Inject
// Path: src/main/java/org/osiam/addons/administration/model/session/GeneralSessionData.java
// @Component
// @Scope(value = "session", proxyMode = ScopedProxyMode.TARGET_CLASS)
// public class GeneralSessionData implements Serializable {
// 
//     private static final long serialVersionUID = 3937661507313495926L;
// 
//     private AccessToken accesstoken;
// 
//     public AccessToken getAccessToken() {
//         return accesstoken;
//     }
// 
//     public void setAccessToken(AccessToken accessToken) {
//         this.accesstoken = accessToken;
//     }
// }


// Path: src/main/java/org/osiam/addons/administration/controller/GlobalExceptionHandler.java
import java.io.IOException;
import javax.inject.Inject;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.osiam.addons.administration.model.session.GeneralSessionData;
import org.osiam.addons.administration.util.RedirectBuilder;
import org.osiam.client.exception.UnauthorizedException;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.security.access.AccessDeniedException;
import org.springframework.security.web.access.AccessDeniedHandler;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.servlet.ModelAndView;
import com.google.common.base.Throwables;

package org.osiam.addons.administration.controller;





/**
 * This class is responsible for handling all exceptions thrown by any controller-handler.
 */
@ControllerAdvice
public class GlobalExceptionHandler implements AccessDeniedHandler {
    private static final Logger LOG = LoggerFactory.getLogger(GlobalExceptionHandler.class);

    @Inject
    private GeneralSessionData session;