You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We will use `samlsp.Middleware` to wrap the endpoint we want to protect. Middleware provides both an `http.Handler` to serve the SAML specific URLs **and** a set of wrappers to require the user to be logged in. We also provide the URL where the service provider can fetch the metadata from the IDP at startup. In our case, we'll use [testshib.org](https://www.testshib.org/), an identity provider designed for testing.
55
55
56
-
package main
56
+
```golang
57
+
package main
57
58
58
-
import (
59
-
"fmt"
60
-
"io/ioutil"
61
-
"net/http"
59
+
import (
60
+
"fmt"
61
+
"io/ioutil"
62
+
"net/http"
62
63
63
-
"github.com/crewjam/saml/samlsp"
64
-
)
64
+
"github.com/crewjam/saml/samlsp"
65
+
)
66
+
67
+
funchello(whttp.ResponseWriter, r *http.Request) {
Next we'll have to register our service provider with the identiy provider to establish trust from the service provider to the IDP. For [testshib.org](https://www.testshib.org/), you can do something like:
0 commit comments