diff --git a/auth/auth.go b/auth/auth.go index ed96972..426f6ab 100644 --- a/auth/auth.go +++ b/auth/auth.go @@ -16,6 +16,11 @@ type AuthManager interface { DoAuth(w http.ResponseWriter, r *http.Request) (*AuthData, bool) } +type Authenticator interface { + DoAuth(w http.ResponseWriter, r *http.Request) (*AuthData, bool) +} + + //---------------------------------------------------------------------------------------------------------------------- func NewAuth(kind string) AuthManager { switch kind { diff --git a/test/static/skin/skin.html b/test/static/skin/skin.html new file mode 100644 index 0000000..126dda7 --- /dev/null +++ b/test/static/skin/skin.html @@ -0,0 +1 @@ +skin-file \ No newline at end of file diff --git a/test/templates/footer.html b/test/templates/footer.html new file mode 100644 index 0000000..37bdaad --- /dev/null +++ b/test/templates/footer.html @@ -0,0 +1,4 @@ +{{define "footer"}} + + +{{end}} \ No newline at end of file diff --git a/test/templates/header.html b/test/templates/header.html new file mode 100644 index 0000000..321fb0e --- /dev/null +++ b/test/templates/header.html @@ -0,0 +1,7 @@ +{{define "header"}} + + + + + +{{end}} \ No newline at end of file diff --git a/test/templates/index.html b/test/templates/index.html new file mode 100644 index 0000000..96bcb5f --- /dev/null +++ b/test/templates/index.html @@ -0,0 +1,3 @@ +{{template "header" .}} +Test of things +{{template "footer" .}} \ No newline at end of file diff --git a/test/templates/test.html b/test/templates/test.html new file mode 100644 index 0000000..fe34cc4 --- /dev/null +++ b/test/templates/test.html @@ -0,0 +1,3 @@ +{{template "header" .}} +User: {{ .User }} +{{template "footer" .}} \ No newline at end of file