1
|
/**
|
2
|
* Copyright (C) 2018 EDIT
|
3
|
* European Distributed Institute of Taxonomy
|
4
|
* http://www.e-taxonomy.eu
|
5
|
*
|
6
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
7
|
* See LICENSE.TXT at the top of this package for the full license terms.
|
8
|
*/
|
9
|
package eu.etaxonomy.cdm.api.application;
|
10
|
|
11
|
import org.springframework.security.core.GrantedAuthority;
|
12
|
|
13
|
/**
|
14
|
* @author a.kohlbecker
|
15
|
* @since Oct 10, 2018
|
16
|
*
|
17
|
*/
|
18
|
public abstract class AbstractRunAs extends RunAsAuthenticator implements IRunAs {
|
19
|
|
20
|
public abstract GrantedAuthority runAsGrantedAuthority();
|
21
|
|
22
|
@Override
|
23
|
public void apply() {
|
24
|
super.runAsAuthentication(runAsGrantedAuthority());
|
25
|
|
26
|
}
|
27
|
|
28
|
@Override
|
29
|
public void restore() {
|
30
|
super.restoreAuthentication();
|
31
|
}
|
32
|
|
33
|
}
|