Documentation
¶
Overview ¶
Package remote is the AuthKit remote SDK: a client that talks to a standalone AuthKit server's management API over HTTP, satisfying the same AuthKit capability interfaces an in-process embedded.Client does (#142). Lean — net/http + encoding/json only, no engine, no pgx.
FIRST slice: authkit.Authorizer. remote.Client marshals each Authorizer call to the management API and re-derives AuthKit sentinel errors from the wire so errors.Is(err, authkit.ErrX) works across the network. The remaining authkit.Client methods grow the same way; this proves the transport.
Index ¶
- type Client
- func (c *Client) Can(ctx context.Context, ...) (bool, error)
- func (c *Client) IsUserAllowed(ctx context.Context, userID string) (bool, error)
- func (c *Client) ListEffectivePermissions(ctx context.Context, subjectID, subjectKind, persona, instanceSlug string) ([]string, error)
- func (c *Client) ListRoleSlugsByUserErr(ctx context.Context, userID string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is a remote-backed AuthKit client.
func New ¶
New builds a remote client for the management API at baseURL, authenticating with a static bearer token (the app→server credential; "" = none).