Class SecurityContext
java.lang.Object
com.sap.cloud.security.token.SecurityContext
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
clear()
Clears the current token, certificate and Identity service broker plans from thread wide storage.static void
Clears the current Identity Service broker plans from thread wide storage.static void
Clears the current Token from thread wide storage.static AccessToken
Returns the token that is saved in thread wide storage.static Certificate
Returns the certificate that is saved in thread wide storage.Returns the Identity service broker plans that are stored in the thread local storagestatic Token
getToken()
Returns the token that is saved in thread wide storage.static void
setClientCertificate
(Certificate certificate) Saves the certificate thread wide.static void
setServicePlans
(String servicePlansHeader) Saves the Identity service broker plans in thread local storage.static void
Saves the validated (!)
-
Method Details
-
getClientCertificate
Returns the certificate that is saved in thread wide storage.- Returns:
- the certificate or null if the storage is empty.
-
setClientCertificate
Saves the certificate thread wide.- Parameters:
certificate
- certificate to be saved.
-
setToken
Saves the validated (!) token thread wide.- Parameters:
token
- token to be saved.
-
getToken
Returns the token that is saved in thread wide storage.- Returns:
- the token or null if the storage is empty.
-
getAccessToken
Returns the token that is saved in thread wide storage.- Returns:
- the token or null if the storage is empty or the token does not implement the
AccessToken
interface.
-
clearToken
public static void clearToken()Clears the current Token from thread wide storage. -
getServicePlans
-
setServicePlans
Saves the Identity service broker plans in thread local storage.- Parameters:
servicePlansHeader
- unprocessed Identity Service broker plan header value from response
-
clearServicePlans
public static void clearServicePlans()Clears the current Identity Service broker plans from thread wide storage. -
clear
public static void clear()Clears the current token, certificate and Identity service broker plans from thread wide storage.
-