ADR-0005 JWT Authentication Extensibility

Constrain our server auth nonce selection with a no-op change for the current
server code-base, in a way which we guarantee and expect clients to check for,
to buy us future proofing.
This commit is contained in:
Phil Pennock
2020-07-01 12:19:32 -04:00
parent 1004bd5cae
commit 11d13dc082
2 changed files with 159 additions and 1 deletions

View File

@@ -37,7 +37,8 @@ func (s *Server) nonceRequired() bool {
}
// Generate a nonce for INFO challenge.
// Assumes server lock is held
// Assumes server lock is held.
// Per ADR-0005, must not start with 0x7B (`{`).
func (s *Server) generateNonce(n []byte) {
var raw [nonceRawLen]byte
data := raw[:]