mirror of
https://github.com/volatiletech/authboss.git
synced 2025-01-24 05:17:10 +02:00
Removed tester
This commit is contained in:
parent
11a0cabe5f
commit
181ba4fb3a
@ -1,37 +0,0 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"net/http"
|
||||
|
||||
"log"
|
||||
|
||||
"io"
|
||||
|
||||
"bytes"
|
||||
|
||||
"github.com/go-authboss/authboss"
|
||||
"github.com/go-authboss/authboss/auth"
|
||||
)
|
||||
|
||||
func main() {
|
||||
a := &auth.Auth{}
|
||||
a.Initialize(authboss.Config{
|
||||
MountPath: "/",
|
||||
})
|
||||
|
||||
mux := http.NewServeMux()
|
||||
|
||||
for path, fn := range a.Routes() {
|
||||
mux.HandleFunc(path, fn)
|
||||
}
|
||||
|
||||
mux.HandleFunc("/authboss.css", func(w http.ResponseWriter, r *http.Request) {
|
||||
if b, err := a.Style(); err != nil {
|
||||
log.Panicln(err)
|
||||
} else {
|
||||
io.Copy(w, bytes.NewBuffer(b))
|
||||
}
|
||||
})
|
||||
|
||||
http.ListenAndServe("localhost:8080", mux)
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user