Class AbstractTokenAPIHandler

    • Constructor Detail

      • AbstractTokenAPIHandler

        protected AbstractTokenAPIHandler​(AbstractTokenAPIHandler.Conf<?> builder)
        Constructor
        Parameters:
        builder - The builder to use.
    • Method Detail

      • addToHeaders

        public void addToHeaders​(HttpHeaderMap headers)
        Override this to add authentication tokens. TokenHandlers do not have tokens, so this only returns default headers.
        Specified by:
        addToHeaders in interface TokenAPIHandler
        Specified by:
        addToHeaders in class AbstractAPIHandler
        Parameters:
        headers - Map of headers with initial values.
      • decodeToken

        public DecodedToken decodeToken()
                                 throws HiroException,
                                        java.io.IOException,
                                        java.lang.InterruptedException
        Decode the payload part of the internal token.
        Specified by:
        decodeToken in interface TokenAPIHandler
        Returns:
        Decoded token as DecodedToken.
        Throws:
        java.lang.InterruptedException - When call gets interrupted.
        java.io.IOException - When call has IO errors.
        HiroException - On Hiro protocol / handling errors.
      • close

        public void close()
        Close the underlying httpClientHandler.
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface TokenAPIHandler