(acls config.AppIP, ip string)
| 596 | } |
| 597 | |
| 598 | func (auth *AuthService) IsBypassedIP(acls config.AppIP, ip string) bool { |
| 599 | for _, bypassed := range acls.Bypass { |
| 600 | res, err := utils.FilterIP(bypassed, ip) |
| 601 | if err != nil { |
| 602 | tlog.App.Warn().Err(err).Str("item", bypassed).Msg("Invalid IP/CIDR in bypass list") |
| 603 | continue |
| 604 | } |
| 605 | if res { |
| 606 | tlog.App.Debug().Str("ip", ip).Str("item", bypassed).Msg("IP is in bypass list, allowing access") |
| 607 | return true |
| 608 | } |
| 609 | } |
| 610 | |
| 611 | tlog.App.Debug().Str("ip", ip).Msg("IP not in bypass list, continuing with authentication") |
| 612 | return false |
| 613 | } |
| 614 | |
| 615 | func (auth *AuthService) NewOAuthSession(serviceName string, params OAuthURLParams) (string, OAuthPendingSession, error) { |
| 616 | auth.ensureOAuthSessionLimit() |
no test coverage detected