version: 0.5.7 listenAddress: ":443" tls: sonar-app: caFile: maverics: certFile: certs/maverics.sonarsystems.co.crt keyFile: certs/maverics.sonarsystems.co.key session: cookieDomain: sonarsystems.com connectors: - name: azure type: azure authType: saml samlMetadataURL: samlConsumerServiceURL: samlEntityID: idps: - name: azure features: authproviders: true authproviders: - name: test serve: |+ import ( "maverics/auth" "maverics/log" "fmt" "net/http" ) func Serve(ag *auth.AuthProvider) error { http.HandleFunc("/sonar/logout", func(rw http.ResponseWriter, req *http.Request) { log.Info("Handling logout endpoint") // Clear the session cookie := &http.Cookie{ Name: "maverics_session", Value: "", Path: "/", Domain: ".sonarsystems.com", } http.SetCookie(rw, cookie) http.Redirect(rw, req, "/sonar/", http.StatusFound) }) } appgateways: - name: Sonar basePath: / upstream: tls: sonar-app isAuthenticated: funcName: IsAuthenticated code: |+ import ( "maverics" "maverics/session" "maverics/log" "fmt" "net/http" ) func IsAuthenticated(ag *maverics.AppGateway, rw http.ResponseWriter, req *http.Request) bool { if session.GetString(req, "webauthn.authenticated") == "true"{ return true } return false } authenticate: funcName: Authenticate file: yourwebauthn.go isAuthorized: funcName: IsAuthorized code: |+ import ( "maverics" "maverics/session" "fmt" "net/http" ) func IsAuthorized(ag *maverics.AppGateway, rw http.ResponseWriter, req *http.Request) bool { return true } locations: - resource: / headers: SM_USER: webauthn.username firstname: webauthn.firstname lastname: webauthn.lastname