Deprecation warning log message

Signed-off-by: m.nabokikh <maksim.nabokikh@flant.com>
This commit is contained in:
m.nabokikh
2021-05-24 19:34:22 +04:00
parent 13a83d9bba
commit dea1d3383c
3 changed files with 8 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ import (
"strings"
"time"
"github.com/dexidp/dex/pkg/log"
"github.com/dexidp/dex/storage"
)
@@ -152,7 +153,7 @@ func (s *Server) handleDeviceCode(w http.ResponseWriter, r *http.Request) {
}
func (s *Server) handleDeviceTokenDeprecated(w http.ResponseWriter, r *http.Request) {
s.logger.Warn(`The deprecated "/device/token" endpoint was called. It will be removed, use "/token" instead.`)
log.Deprecated(s.logger, `The /device/token endpoint was called. It will be removed, use /token instead.`)
w.Header().Set("Content-Type", "application/json")
switch r.Method {