mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Authn: Stat registration (#62934)
* reorganize auth usage stats * usage stat privilege elevators * stat count of modified role * cfg related info * add authn anon client * kv store * ensure anon enabled is collected even if client is not registered * fix usage stats test
This commit is contained in:
@@ -114,6 +114,13 @@ type ProxyClient interface {
|
||||
AuthenticateProxy(ctx context.Context, r *Request, username string, additional map[string]string) (*Identity, error)
|
||||
}
|
||||
|
||||
// UsageStatClient is an optional interface that auth clients can implement.
|
||||
// Clients that implements this interface can specify a usage stat collection hook
|
||||
type UsageStatClient interface {
|
||||
Client
|
||||
UsageStatFn(ctx context.Context) (map[string]interface{}, error)
|
||||
}
|
||||
|
||||
type Request struct {
|
||||
// OrgID will be populated by authn.Service
|
||||
OrgID int64
|
||||
|
||||
Reference in New Issue
Block a user