func (a *Authenticator) UpdateUser(upd UserUpdater) func(http.Handler) http.Handler {
	f := func(h http.Handler) http.Handler {
		fn := func(w http.ResponseWriter, r *http.Request) {
			if user, err := token.GetUserInfo(r); err == nil {
				r = token.SetUserInfo(r, upd.Update(user))
			}
			h.ServeHTTP(w, r)
		}
		return http.HandlerFunc(fn)
	}
	return f
}
UpdateUser update user info with UserUpdater if it exists in request's context. Otherwise do nothing.
should be placed after either Auth, Trace. AdminOnly or RBAC middleware.
package middleware
import (
	"net/http"
	"github.com/go-pkgz/auth/token"
)
type UserUpdater interface {
	Update(claims token.User) token.User
}
type UserUpdFunc func(user token.User) token.User
func (f UserUpdFunc) Update(user token.User) token.User {
	return f(user)
}