SimpleTutorialHosting/internal/auth/auth.go

16 lines
267 B
Go
Raw Normal View History

2024-10-27 11:12:56 +00:00
package auth
import (
"SimpleTutorialHosting/internal/models"
"net/http"
)
type contextKey string
const UserContextKey contextKey = "user"
type Authenticator interface {
Authenticate(http.Handler) http.Handler
GetUser(r *http.Request) (*models.User, error)
}