sig_auth v0.1.2 SigAuth.CredentialServer behaviour
This module represents the contract that every Credential Server must adhere
to. These methods are used by the SigAuth.Plug
module to streamline request
authentication and nonce maintenince.
During each request, the plug will first request the public key from the
credential server, calling get_public_key(username)
. The plug will then
ask the credential server to validate the submitted nonce, calling
nonce_valid(username, nonce)
. If the signature is valid, then the plug will
notify the credential server by calling update_nonce(username, integer)
.
At each of these steps, a failure will abort the rest of the chain and deny the authorization request.