MCPcopy Create free account
hub / github.com/dicej/tagger / authenticate

Function authenticate

server/src/auth.rs:52–112  ·  view source on GitHub ↗

Attempt to authenticate a user based on the credentials specified in `request`. `conn`: used to query the "users" table in the Tagger database `key`: used to sign access tokens `mutex`: used to bottleneck all calls to this method in order to mitigate parallel brute force attacks `invalid_credential_delay`: minimum delay added to responses to invalid authentication requests. Note that these de

(
    conn: &AsyncMutex<SqliteConnection>,
    request: &TokenRequest,
    key: &[u8],
    mutex: &AsyncMutex<()>,
    invalid_credential_delay: Duration,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 1

routesFunction · 0.85

Calls 2

hash_passwordFunction · 0.85
responseFunction · 0.85

Tested by

no test coverage detected