MCPcopy
hub / github.com/google/seesaw / Authenticator

Interface Authenticator

ecu/auth.go:32–45  ·  view source on GitHub ↗

Authenticator types provide functionality for authenticating users and adding the authenticated information to a context.

Source from the content-addressed store, hash-verified

30// Authenticator types provide functionality for authenticating users and adding
31// the authenticated information to a context.
32type Authenticator interface {
33 // AuthInit will be called once when the ECU is run to set up required
34 // resources for authentication. If nothing is needed, it should simply
35 // return nil. If an error is returned, a warning will be
36 // logged but the ECU will continue to run, so implementations should ensure
37 // Authenticate does not crash if AuthInit fails.
38 AuthInit() error
39
40 // Authenticate inspects the provided context (particularly ctx.AuthToken)
41 // and either returns an error or creates a child context treated as
42 // authenticated (ctx.AuthType == ipc.ATSSO) and fields needed for
43 // authorization checks (ctx.User).
44 Authenticate(ctx *ipc.Context) (*ipc.Context, error)
45}
46
47// DefaultAuthenticator implements a "default-deny authenticator" that denies
48// all authentications. Using this prevents remote connections to the ECU.

Callers 2

RunMethod · 0.65
authConnectMethod · 0.65

Implementers 1

Calls

no outgoing calls

Tested by

no test coverage detected