public final class LocalThreadAuthentication extends Object
Class used to share the authentication among code running in the same thread (To avoid polluting APIs with the user executing the operation).
Modifier and Type | Method and Description |
---|---|
static Authentication |
get()
Gets the authentication for the current thread.
|
static void |
remove()
Removes the authentication for the current thread.
|
static void |
set(Authentication newValue)
Sets the authentication for the current thread.
|
public static Authentication get()
null
otherwise.public static void set(Authentication newValue)
newValue
- the authentication for the current threadpublic static void remove()
If the authentication is subsequently read by the current thread, its
value will be null
.
Copyright © 2015. All Rights Reserved.