Documentation
¶
Overview ¶
Package sdk provides an embeddable SDK for the Dex OIDC identity provider.
Index ¶
- type DexIdP
- func (d *DexIdP) CreateUser(ctx context.Context, email, username, password string) (string, error)
- func (d *DexIdP) DeleteUser(ctx context.Context, email string) error
- func (d *DexIdP) DiscoveryEndpoint() string
- func (d *DexIdP) EnsureDefaultClients(ctx context.Context, dashboardURIs, cliURIs []string) error
- func (d *DexIdP) IssuerURL() string
- func (d *DexIdP) ListUsers(ctx context.Context) ([]storage.Password, error)
- func (d *DexIdP) Start(ctx context.Context) error
- func (d *DexIdP) Stop(ctx context.Context) error
- func (d *DexIdP) Storage() storage.Storage
- type Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DexIdP ¶
type DexIdP struct {
// contains filtered or unexported fields
}
DexIdP wraps the Dex provider with a builder pattern
func NewFromConfigFile ¶
NewFromConfigFile creates a new DexIdP instance from a YAML config file
func NewFromYAMLConfig ¶
func NewFromYAMLConfig(yamlConfig *dex.YAMLConfig) (*DexIdP, error)
NewFromYAMLConfig creates a new DexIdP instance from a YAMLConfig
func (*DexIdP) CreateUser ¶
CreateUser creates a new user with the given email, username, and password. Returns the encoded user ID in Dex's format.
func (*DexIdP) DeleteUser ¶
DeleteUser removes a user by email
func (*DexIdP) DiscoveryEndpoint ¶
DiscoveryEndpoint returns the OIDC discovery endpoint URL
func (*DexIdP) EnsureDefaultClients ¶
EnsureDefaultClients creates the default NetBird OAuth clients
type Option ¶
Option configures a DexIdP instance
func WithDataDir ¶
WithDataDir sets the data directory for storage
func WithDevMode ¶
WithDevMode enables development mode (allows HTTP)