(ctx context.Context, user, pw string)
| 134 | } |
| 135 | |
| 136 | func (a *API) tokenAuthnCheck(ctx context.Context, user, pw string) (bool, error) { |
| 137 | pwBytes, err := hex.DecodeString(pw) |
| 138 | if err != nil { |
| 139 | return false, nil |
| 140 | } |
| 141 | return a.tokens.Check(ctx, user, pwBytes) |
| 142 | } |
| 143 | |
| 144 | func (a *API) cachedTokenAuthnCheck(ctx context.Context, user, pw string) error { |
| 145 | a.tokenMu.Lock() |
no test coverage detected