"github.com/passageidentity/passage-go"
func exampleHandler(w http.ResponseWriter, r *http.Request) {
psg, _ := passage.New("<PASSAGE_APP_ID>", &passage.Config{
APIKey: "<PASSAGE_API_KEY>",
passageUserID, err := psg.AuthenticateRequest(r)
// π¨ Authentication failed!
w.WriteHeader(http.StatusUnauthorized)
// The passageUserID returned above can be used to get user information:
passageUser, err := psg.GetUser(passageUserID)
// π Couldn't get the Passage User
w.WriteHeader(http.StatusInternalServerError)
// The passageUser struct can now be inspected for detailed information
// about the user. A full list of fields can be found here:
// https://pkg.go.dev/github.com/passageidentity/passage-go#User