Documentation ¶
Index ¶
- Variables
- type Config
- type Server
- func (s *Server) CreateUser(ctx context.Context, req *local_user.CreateUserReq) (*local_user.User, error)
- func (s *Server) DeleteUser(ctx context.Context, req *local_user.Email) (*local_user.DeleteUserResp, error)
- func (s *Server) GRPC(addr string) error
- func (s *Server) GetUser(ctx context.Context, req *local_user.Email) (*local_user.User, error)
- func (s *Server) GetUsers(ctx context.Context, _ *local_user.GetUsersReq) (*local_user.Users, error)
- func (s *Server) MigrateA1UserRoles(ctx context.Context) error
- func (s *Server) MigrateA1Users(ctx context.Context) error
- func (s *Server) NewGRPCServer() *grpc.Server
- func (s *Server) UpdateSelf(ctx context.Context, req *local_user.UpdateSelfReq) (*local_user.User, error)
- func (s *Server) UpdateUser(ctx context.Context, req *local_user.UpdateUserReq) (*local_user.User, error)
- type UsersConfig
Constants ¶
This section is empty.
Variables ¶
var UsersConfigs = map[string]func() UsersConfig{ "mock": func() UsersConfig { return new(mock.Config) }, "dex": func() UsersConfig { return new(dex.Config) }, }
UsersConfigs variable provides an easy way to return a config struct depending on the users adapter type.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { A1UserData string A1UserRolesData string Logger *zap.Logger Users UsersConfig ServiceCerts *certs.ServiceCerts TeamsAddress string AuthzAddress string }
Config holds the server's configuration options.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is the top level object.
func (*Server) CreateUser ¶
func (s *Server) CreateUser(ctx context.Context, req *local_user.CreateUserReq) (*local_user.User, error)
CreateUser adds a user with a generated UUID to dex
func (*Server) DeleteUser ¶
func (s *Server) DeleteUser(ctx context.Context, req *local_user.Email) (*local_user.DeleteUserResp, error)
DeleteUser deletes user from dex
func (*Server) GetUser ¶
func (s *Server) GetUser(ctx context.Context, req *local_user.Email) (*local_user.User, error)
GetUser fetches user by email, which dex uses as unique identifier
func (*Server) GetUsers ¶
func (s *Server) GetUsers(ctx context.Context, _ *local_user.GetUsersReq) (*local_user.Users, error)
GetUsers fetches hash of users, implemented without wrapping usersAPI struct
func (*Server) NewGRPCServer ¶
NewGRPCServer returns a server that provides our services: clients, users, and authentication requests.
func (*Server) UpdateSelf ¶
func (s *Server) UpdateSelf(ctx context.Context, req *local_user.UpdateSelfReq) (*local_user.User, error)
UpdateSelf updates the user's name and, optionally, password. If password is updated, the user must provide the previous_password.
func (*Server) UpdateUser ¶
func (s *Server) UpdateUser(ctx context.Context, req *local_user.UpdateUserReq) (*local_user.User, error)
UpdateUser updates the user's name and, optionally, password.
type UsersConfig ¶
UsersConfig is a configuration that can open a users adapter