Klasse IAMTokenCache

java.lang.Object
de.pisa.psa.rst.uti.IAMTokenCache

public final class IAMTokenCache extends Object
Cache for IAM tokens
Seit:
27.07.2023
Autor:
weiland
  • Methodendetails

    • get

      public static IAMTokenCache 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

      public Optional<IAMTokenCache.Entry> findValidEntry(String token)
      search an IAM token in the valid cache entries
      Parameter:
      token - token to search
      Gibt zurück:
      cache entry
    • findInvalidEntry

      public Optional<IAMTokenCache.Entry> findInvalidEntry(String token)
      search an IAM token in the invalid cache entries
      Parameter:
      token - token to search
      Gibt zurück:
      cache entry
    • putValidEntry

      public void putValidEntry(String token, de.pisa.psa.com.dxhub.iam.UserInfo user_info)
      add a valid token to the cache
      Parameter:
      token - IAM token
      user_info - user information
    • putInvalidEntry

      public void putInvalidEntry(String token)
      add an invalid token to the cache
      Parameter:
      token - IAM token
    • putAuthenticationRequired

      public IAMTokenCache.AuthenticationRequired putAuthenticationRequired(int status, String json)
      put the response if the authentication is required
      Parameter:
      status - status code
      json - entity
      Gibt zurück:
      response
    • getAuthenticationRequired

      public Optional<IAMTokenCache.AuthenticationRequired> getAuthenticationRequired()
      Get the response if the authentication is required
      Gibt zurück:
      response
    • clear

      public void clear()
      clear all cache entries