Browse Source

track auth methods (toen and basic auth)

pull/5399/head
B-OnTheGo 6 years ago committed by GitHub
parent
commit
8150fe7b6a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      pkg/auth/auth.go

3
pkg/auth/auth.go

@ -59,6 +59,7 @@ func SignedInID(c *macaron.Context, sess session.Store) int64 {
if err = models.UpdateAccessToken(t); err != nil {
log.Error(2, "UpdateAccessToken: %v", err)
}
c.Data["IsApiToken"] = true
return t.UID
}
}
@ -134,7 +135,7 @@ func SignedInUser(ctx *macaron.Context, sess session.Store) (*models.User, bool)
}
return nil, false
}
c.Data["IsApiToken"] = true
return u, true
}
}

Loading…
Cancel
Save