Skip to content

Commit fc8b69f

Browse files
committed
build log prints into saml connector
1 parent db71cae commit fc8b69f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pkg/api/auth.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,7 @@ func (h APIHandler) samlConnecter(c *gin.Context) {
180180

181181
data := c.Request.Form
182182
samlResponseData := data.Get("SAMLResponse")
183+
fmt.Println(samlResponseData)
183184

184185
samlResponse, err := saml.Verify(
185186
samlResponseData,
@@ -194,11 +195,12 @@ func (h APIHandler) samlConnecter(c *gin.Context) {
194195
return
195196
}
196197
username := samlResponse.Assertion.Subject.NameID.Value
198+
197199
if err != nil {
198200
c.AbortWithError(http.StatusNotAcceptable, fmt.Errorf("username not found"))
199201
return
200202
}
201-
203+
// -- belove this line is how we handle users that are authenticatd
202204
jwtToken, err := generateJWT(username, 12)
203205
if err != nil {
204206
c.AbortWithError(http.StatusNotAcceptable, err)

0 commit comments

Comments
 (0)