|
26 | 26 | */
|
27 | 27 | public class SecurityContextChangedEvent extends ApplicationEvent {
|
28 | 28 |
|
29 |
| - private final SecurityContext previous; |
| 29 | + private final SecurityContext oldContext; |
30 | 30 |
|
31 |
| - private final SecurityContext current; |
| 31 | + private final SecurityContext newContext; |
32 | 32 |
|
33 | 33 | /**
|
34 | 34 | * Construct an event
|
35 |
| - * @param previous the old security context |
36 |
| - * @param current the new security context |
| 35 | + * @param oldContext the old security context |
| 36 | + * @param newContext the new security context |
37 | 37 | */
|
38 |
| - public SecurityContextChangedEvent(SecurityContext previous, SecurityContext current) { |
| 38 | + public SecurityContextChangedEvent(SecurityContext oldContext, SecurityContext newContext) { |
39 | 39 | super(SecurityContextHolder.class);
|
40 |
| - this.previous = previous; |
41 |
| - this.current = current; |
| 40 | + this.oldContext = oldContext; |
| 41 | + this.newContext = newContext; |
42 | 42 | }
|
43 | 43 |
|
44 | 44 | /**
|
45 | 45 | * Get the {@link SecurityContext} set on the {@link SecurityContextHolder}
|
46 | 46 | * immediately previous to this event
|
47 | 47 | * @return the previous {@link SecurityContext}
|
48 | 48 | */
|
49 |
| - public SecurityContext getPreviousContext() { |
50 |
| - return this.previous; |
| 49 | + public SecurityContext getOldContext() { |
| 50 | + return this.oldContext; |
51 | 51 | }
|
52 | 52 |
|
53 | 53 | /**
|
54 | 54 | * Get the {@link SecurityContext} set on the {@link SecurityContextHolder} as of this
|
55 | 55 | * event
|
56 | 56 | * @return the current {@link SecurityContext}
|
57 | 57 | */
|
58 |
| - public SecurityContext getCurrentContext() { |
59 |
| - return this.current; |
| 58 | + public SecurityContext getNewContext() { |
| 59 | + return this.newContext; |
60 | 60 | }
|
61 | 61 |
|
62 | 62 | }
|
0 commit comments