SimpleTutorialHosting/internal/auth/auth.go
Mitchell Thompson 56635fc145 first commit
2024-10-27 07:12:56 -04:00

16 lines
267 B
Go

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)
}