public class SecurityContextThreadLocalAccessor extends Object implements ThreadLocalAccessor
ThreadLocalAccessor
to extract and restore security context through
SecurityContextHolder
.Constructor and Description |
---|
SecurityContextThreadLocalAccessor() |
Modifier and Type | Method and Description |
---|---|
void |
extractValues(Map<String,Object> container)
Extract ThreadLocal values and add them to the given Map, so they can be
saved and subsequently
restored around the
invocation of data fetchers and exception resolvers. |
void |
resetValues(Map<String,Object> values)
|
void |
restoreValues(Map<String,Object> values)
Restore ThreadLocal context by looking up previously
extracted values. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
composite
public void extractValues(Map<String,Object> container)
ThreadLocalAccessor
restored
around the
invocation of data fetchers and exception resolvers.extractValues
in interface ThreadLocalAccessor
container
- to add extracted ThreadLocal values topublic void restoreValues(Map<String,Object> values)
ThreadLocalAccessor
extracted
values.restoreValues
in interface ThreadLocalAccessor
values
- previously extracted saved ThreadLocal valuespublic void resetValues(Map<String,Object> values)
ThreadLocalAccessor
resetValues
in interface ThreadLocalAccessor
values
- previously extracted saved ThreadLocal values