MCPcopy
hub / github.com/tinyauthapp/tinyauth / AuditLoginSuccess

Function AuditLoginSuccess

internal/utils/tlog/log_audit.go:7–16  ·  view source on GitHub ↗

functions here use CallerSkipFrame to ensure correct caller info is logged

(c *gin.Context, username, provider string)

Source from the content-addressed store, hash-verified

5// functions here use CallerSkipFrame to ensure correct caller info is logged
6
7func AuditLoginSuccess(c *gin.Context, username, provider string) {
8 Audit.Info().
9 CallerSkipFrame(1).
10 Str("event", "login").
11 Str("result", "success").
12 Str("username", username).
13 Str("provider", provider).
14 Str("ip", c.ClientIP()).
15 Send()
16}
17
18func AuditLoginFailure(c *gin.Context, username, provider string, reason string) {
19 Audit.Warn().

Callers 3

oauthCallbackHandlerMethod · 0.92
loginHandlerMethod · 0.92
totpHandlerMethod · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected