Package de.pisa.psa.rst.uti
Klasse IAMTokenCache
java.lang.Object
de.pisa.psa.rst.uti.IAMTokenCache
Cache for IAM tokens
- Seit:
- 27.07.2023
- Autor:
- weiland
-
Verschachtelte Klassen - Übersicht
Verschachtelte KlassenModifizierer und TypKlasseBeschreibungfinal class
response for a required authenticationfinal class
cache entryclass
expire logic -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
clear()
clear all cache entriesfindInvalidEntry
(String token) search an IAM token in the invalid cache entriesfindValidEntry
(String token) search an IAM token in the valid cache entriesstatic IAMTokenCache
get()
get the instanceGet the response if the authentication is requiredputAuthenticationRequired
(int status, String json) put the response if the authentication is requiredvoid
putInvalidEntry
(String token) add an invalid token to the cachevoid
putValidEntry
(String token, de.pisa.psa.com.dxhub.iam.UserInfo user_info) add a valid token to the cachevoid
setExpiresIn
(int seconds) set the time when the entries expirevoid
setSize
(int size) set the cache size
-
Methodendetails
-
get
get the instance- Gibt zurück:
- instance
-
setExpiresIn
public void setExpiresIn(int seconds) set the time when the entries expire- Parameter:
seconds
- time in seconds
-
setSize
public void setSize(int size) set the cache size- Parameter:
size
- number of elements
-
findValidEntry
search an IAM token in the valid cache entries- Parameter:
token
- token to search- Gibt zurück:
- cache entry
-
findInvalidEntry
search an IAM token in the invalid cache entries- Parameter:
token
- token to search- Gibt zurück:
- cache entry
-
putValidEntry
add a valid token to the cache- Parameter:
token
- IAM tokenuser_info
- user information
-
putInvalidEntry
add an invalid token to the cache- Parameter:
token
- IAM token
-
putAuthenticationRequired
put the response if the authentication is required- Parameter:
status
- status codejson
- entity- Gibt zurück:
- response
-
getAuthenticationRequired
Get the response if the authentication is required- Gibt zurück:
- response
-
clear
public void clear()clear all cache entries
-