// NewHandlerWrapper returns a new 'authenticated' handler. It verifies both tokens and signatures before proceeding.
NewHandlerWrapper returns a new 'authenticated' handler. It verifies both tokens and signatures before proceeding.
// NewHandlerWrapper returns a new ' authenticated ' handler . It verifies both tokens and signatures before proceeding .
func NewHandlerWrapper(handler common.HTTPHandler, authCfg *resthandler.Config, s spi.Store,
	verifier signatureVerifier, tm authTokenManager) *HandlerWrapper {
	ah := &HandlerWrapper{
		resolver:      handler,
		handleRequest: handler.Handler(),
	}
	ah.AuthHandler = resthandler.NewAuthHandler(authCfg, handler.Path(), handler.Method(), s, verifier, tm,
		func(actorIRI *url.URL) (bool, error) {
			logger.Debugf("[%s] Authorized actor [%s]", ah.Path(), actorIRI)
			return true, nil
		})
	return ah
}
func NewHandlerWrapper ( handler common . HTTPHandler , authCfg * resthandler . Config , s spi . Store , verifier signatureVerifier , tm authTokenManager ) * HandlerWrapper { ah := & HandlerWrapper { resolver : handler , handleRequest : handler . Handler ( ) , } ah . AuthHandler = resthandler . NewAuthHandler ( authCfg , handler . Path ( ) , handler . Method ( ) , s , verifier , tm , func ( actorIRI * url . URL ) ( bool , error ) { logger . Debugf ( " " , ah . Path ( ) , actorIRI ) return true , nil } ) return ah }
NewHandlerWrapper returns a new 'authenticated' handler.
NewHandlerWrapper returns a new ' authenticated ' handler .