(username string)
| 91 | } |
| 92 | |
| 93 | func (a *Auth) Lookup(username string) (string, bool, error) { |
| 94 | if a.useHelper { |
| 95 | return "", false, fmt.Errorf("shadow: table lookup are not possible when using a helper") |
| 96 | } |
| 97 | |
| 98 | ent, err := Lookup(username) |
| 99 | if err != nil { |
| 100 | if errors.Is(err, ErrNoSuchUser) { |
| 101 | return "", false, nil |
| 102 | } |
| 103 | return "", false, err |
| 104 | } |
| 105 | |
| 106 | if !ent.IsAccountValid() { |
| 107 | return "", false, nil |
| 108 | } |
| 109 | |
| 110 | return "", true, nil |
| 111 | } |
| 112 | |
| 113 | func (a *Auth) AuthPlain(username, password string) error { |
| 114 | if a.useHelper { |
nothing calls this directly
no test coverage detected