mirror of
https://github.com/phishingclub/phishingclub.git
synced 2026-10-12 01:58:53 +02:00
1 parent
61ecc4c505
commit
3a11ca4d3a
4 files changed
+20
-39
No files matched your search
@@ -64,8 +64,10 @@ func (c *Scim) authenticate(g *gin.Context, companyID *uuid.UUID) (*service.Scim
|
||||
|
||||
config, authed, err := c.ScimService.VerifyAndLoadConfig(g.Request.Context(), companyID, token)
|
||||
if err != nil {
|
||||
// a missing config is reported with the same generic 401 as a bad token so
|
||||
// the response does not reveal whether a company has SCIM configured
|
||||
if isNotFound(err) {
|
||||
scimError(g, http.StatusUnauthorized, "no SCIM configuration found for this company")
|
||||
scimError(g, http.StatusUnauthorized, "invalid bearer token or SCIM provisioning is disabled")
|
||||
return nil, false
|
||||
}
|
||||
c.Logger.Errorw("scim auth: error verifying token", "error", err)
|
||||
|
||||
Reference in new issue
Block a user