summaryrefslogtreecommitdiff
blob: acb34e536cd5af2d7911c4bad20688e27b7c5073 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package templates

import (
	"html/template"
	"net/http"
)

func RenderTOTPTemplate(w http.ResponseWriter, r *http.Request) {

	data := struct {
		CameFrom string
	}{
		CameFrom: getPath(r),
	}

	templates := template.Must(
		template.Must(
			template.New("Show").
				ParseGlob("web/templates/layout/*.tmpl")).
			ParseGlob("web/templates/authentication/totp.tmpl"))

	templates.ExecuteTemplate(w, "totp.tmpl", data)
}