Example usage for org.springframework.security.web.authentication.switchuser AuthenticationSwitchUserEvent getAuthentication

List of usage examples for org.springframework.security.web.authentication.switchuser AuthenticationSwitchUserEvent getAuthentication

Introduction

In this page you can find the example usage for org.springframework.security.web.authentication.switchuser AuthenticationSwitchUserEvent getAuthentication.

Prototype

public Authentication getAuthentication() 

Source Link

Document

Getters for the Authentication request that caused the event.

Usage

From source file:edu.uiowa.icts.authentication.SwitchUserListener.java

@Override
public void onApplicationEvent(AuthenticationSwitchUserEvent event) {
    AuditLogger.info("", event.getAuthentication().getName(), "Switch User", "User switch from "
            + event.getAuthentication().getName() + " to " + event.getTargetUser().getUsername());
    log.info("User switch from " + event.getAuthentication().getName() + " to "
            + event.getTargetUser().getUsername());
}