StateMachine implements the SASL challenge/response flow for a single SASL handshake. A StateMachine will be created by the Mechanism per connection, so it does not need to be safe for concurrent access by multiple goroutines. Once the StateMachine is created by the Mechanism, the caller loops by
| 38 | // authentication has been successfully completed via the done return value, or |
| 39 | // it will indicate that the authentication failed by returning a non-nil error. |
| 40 | type StateMachine interface { |
| 41 | // Next continues challenge-response authentication. A non-nil error |
| 42 | // indicates that the client should abort the authentication attempt. If |
| 43 | // the client has been successfully authenticated, then the done return |
| 44 | // value will be true. |
| 45 | Next(ctx context.Context, challenge []byte) (done bool, response []byte, err error) |
| 46 | } |
| 47 | |
| 48 | // Metadata contains additional data for performing SASL authentication. |
| 49 | type Metadata struct { |
no outgoing calls
no test coverage detected