users

package
v0.2.52-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 23, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrConfiguration = goerrors.New("configuration error")
)

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client is responsible for user management.

func New

func New(host string, client client.Client, namespace string, issuer *jose.JWTIssuer, options *Options) *Client

New creates a new user client.

func (*Client) Create

func (c *Client) Create(ctx context.Context, organizationID string, request *openapi.UserWrite) (*openapi.UserRead, error)

Create makes a new user and issues an access token.

func (*Client) Delete

func (c *Client) Delete(ctx context.Context, organizationID, userID string) error

Delete removes the user and revokes the access token.

func (*Client) List

func (c *Client) List(ctx context.Context, organizationID string) (openapi.Users, error)

List retrieves information about all users in the organization.

func (*Client) Signup added in v0.2.52

func (c *Client) Signup(w http.ResponseWriter, r *http.Request)

Signup is called when a user clicks on the email verification link, it verifies the token is valid, and transitions the user into an active state.

func (*Client) Update

func (c *Client) Update(ctx context.Context, organizationID, userID string, request *openapi.UserWrite) (*openapi.UserRead, error)

Update modifies any metadata for the user if it exists. If a matching account doesn't exist it raises an error.

type Options added in v0.2.52

type Options struct {
	// contains filtered or unexported fields
}

func (*Options) AddFlags added in v0.2.52

func (o *Options) AddFlags(f *pflag.FlagSet)

type SignupClaims added in v0.2.52

type SignupClaims struct {
	jwt.Claims `json:",inline"`

	OrganizationID string `json:"unikorn:oid"`
	UserID         string `json:"unikorn:uid"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL