Merge pull request #2711 from davidswu/autoredirect

add autoredirect auth config
This commit is contained in:
Derek McGowan
2018-11-27 15:48:25 -08:00
committed by GitHub
9 changed files with 48 additions and 29 deletions

View File

@@ -245,7 +245,7 @@ func (ts *tokenServer) getToken(ctx context.Context, w http.ResponseWriter, r *h
// Get response context.
ctx, w = dcontext.WithResponseWriter(ctx, w)
challenge.SetHeaders(w)
challenge.SetHeaders(r, w)
handleError(ctx, errcode.ErrorCodeUnauthorized.WithDetail(challenge.Error()), w)
dcontext.GetResponseLogger(ctx).Info("get token authentication challenge")