Class TokenHandler.Builder

    • Method Detail

      • tokenHeader

        public TokenHandler.Builder tokenHeader​(String header)
        Set the name of header to look into to extract the token.
        Parameters:
        header - header name (such as Authorization), case insensitive
        Returns:
        updated builder instance
      • tokenPrefix

        public TokenHandler.Builder tokenPrefix​(String prefix)
        Set the prefix of header value to extract the token.
        Parameters:
        prefix - prefix of header value to strip from it, case insensitive
        Returns:
        updated builder instance
      • tokenPattern

        public TokenHandler.Builder tokenPattern​(Pattern pattern)
        Set the token pattern (Regular expression) to extract the token.
        Parameters:
        pattern - pattern to use to extract the token, first group will be used
        Returns:
        updated builder instance
      • build

        public TokenHandler build()
        Build a new instance from this builder.
        Specified by:
        build in interface Builder<TokenHandler>
        Returns:
        instance built based on this builder
      • config

        public TokenHandler.Builder config​(Config config)
        Update builder from config.
        Parameters:
        config - Configuration to update from
        Returns:
        update builder instance