Documentation
¶
Overview ¶
Package authsome provides an adapter that bridges an external Authsome authentication service to the Nexus auth.Provider interface.
Deprecated: nothing consults an auth.Provider, so wiring this adapter through nexus.WithAuth authenticates nothing. The gateway checks its own gateway keys (nxs_...), and an Authsome Bearer token sent to it counts as a presented key and is refused 401. The package stays only so existing code compiles, and goes in the v1 break.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter bridges Authsome to Nexus auth.Provider.
func (*Adapter) Authenticate ¶
Authenticate validates credentials from the request context. It extracts the bearer token from context and validates via Authsome.
type Authenticator ¶
type Authenticator interface {
// Authenticate validates a token and returns the subject (e.g., tenant ID).
Authenticate(ctx context.Context, token string) (subject string, err error)
}
Authenticator represents an external Authsome authentication service. This is the minimal interface that the Authsome adapter requires.