summaryrefslogtreecommitdiff
path: root/pkg/sts/sts.go
blob: 1030280c65b3f7c9a704280d3a6a0f213598e167 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package sts

import (
	"context"
	"net/http"

	"github.com/xlgmokha/x/pkg/log"
	"github.com/xlgmokha/x/pkg/x"
)

func New(ctx context.Context) http.Handler {
	mux := http.NewServeMux()
	mux.HandleFunc("POST /oauth/token", func(w http.ResponseWriter, r *http.Request) {
		w.WriteHeader(http.StatusCreated)
	})

	return x.Middleware[http.Handler](
		mux,
		log.HTTP(log.From(ctx)),
	)
}