Class RefreshableSecurityTokenAdapter<T>


  • public class RefreshableSecurityTokenAdapter<T>
    extends Object
    An extension of @SecurityTokenAdapter that allows the security token to be refreshed
    • Constructor Detail

      • RefreshableSecurityTokenAdapter

        public RefreshableSecurityTokenAdapter​(Function<T,​String> resourcePrincipalSessionTokenSupplier,
                                               T resourcePrincipalCreationConfig,
                                               SessionKeySupplier sessionKeySupplier)
      • RefreshableSecurityTokenAdapter

        public RefreshableSecurityTokenAdapter​(String securityToken,
                                               SessionKeySupplier sessionKeySupplier,
                                               Function<T,​String> resourcePrincipalSessionTokenSupplier,
                                               T resourcePrincipalCreationConfig)
    • Method Detail

      • isValid

        public boolean isValid()
        Checks to see if the current token is still valid
        Returns:
        true if valid
      • getStringClaim

        public String getStringClaim​(String key)
        Return a claim from the token
      • getTokenValidDuration

        public Duration getTokenValidDuration()
        Get half of the token duration
        Returns:
        half of the token duration
      • getSecurityToken

        public String getSecurityToken()
      • refreshToken

        public void refreshToken()