mirror of
https://github.com/grafana/grafana.git
synced 2025-07-31 05:02:35 +08:00
API: send Login actions (#27249)
* API: first version to send events about login actions * API: improve login actions events * Login: update auth test with new behavior * Login: update auth test for auth module * Login OAuth: improve functions structure * API: make struct public to use for saml * API: add send login log tests for grafana and ldap login * API: remove log from tests * Login API: fix test linting * Update pkg/api/login_oauth.go Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com> * Login API: refactor using defer Co-authored-by: Emil Tullstedt <emil.tullstedt@grafana.com>
This commit is contained in:
@ -65,6 +65,15 @@ type DeleteAuthInfoCommand struct {
|
||||
UserAuth *UserAuth
|
||||
}
|
||||
|
||||
type SendLoginLogCommand struct {
|
||||
ReqContext *ReqContext
|
||||
LogAction string
|
||||
User *User
|
||||
ExternalUser *ExternalUserInfo
|
||||
HTTPStatus int
|
||||
Error error
|
||||
}
|
||||
|
||||
// ----------------------
|
||||
// QUERIES
|
||||
|
||||
@ -74,6 +83,7 @@ type LoginUserQuery struct {
|
||||
Password string
|
||||
User *User
|
||||
IpAddress string
|
||||
AuthModule string
|
||||
}
|
||||
|
||||
type GetUserByAuthInfoQuery struct {
|
||||
|
Reference in New Issue
Block a user