func New(channelID string, tokens []string, handler common.HTTPHandler) common.HTTPHandler {
	if len(tokens) == 0 {
		logger.Debugf("[%s] No authorization token(s) specified. Authorization will NOT be performed for %s on path [%s]", channelID, handler.Method(), handler.Path())
		return handler
	}
	logger.Debugf("[%s] Creating authorization handler for %s on path [%s]", channelID, handler.Method(), handler.Path())
	return &Handler{
		HTTPHandler: handler,
		channelID:   channelID,
		tokens:      tokens,
	}
}
New returns a new auth handler
package authhandler
import (
	"crypto/subtle"
	"net/http"
	"github.com/hyperledger/fabric/common/flogging"
	"github.com/trustbloc/sidetree-core-go/pkg/restapi/common"
)
var logger = flogging.MustGetLogger("sidetree_peer")
const (
	authHeader  = "Authorization"
	tokenPrefix = "Bearer "
)
type Handler struct {
	common.HTTPHandler
	channelID string
	tokens    []string
}