MCPcopy
hub / github.com/segmentio/kafka-go / StateMachine

Interface StateMachine

sasl/sasl.go:40–46  ·  sasl/sasl.go::StateMachine

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

Source from the content-addressed store, hash-verified

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.
40type 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.
49type Metadata struct {

Callers 4

authenticateSASLMethod · 0.65
authenticateSASLFunction · 0.65
runMethod · 0.65
TestConsumerGroupFunction · 0.65

Implementers 5

ConsumerGroupconsumergroup.go
sessionsasl/scram/scram.go
Mechanismsasl/aws_msk_iam_v2/msk_iam.go
Mechanismsasl/aws_msk_iam/msk_iam.go
Mechanismsasl/plain/plain.go

Calls

no outgoing calls

Tested by

no test coverage detected