mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-16 12:58:00 +00:00
41ae35f2ef
# Which Problems Are Solved Added functionality that user with a userschema can be created and removed. # How the Problems Are Solved Added logic and moved APIs so that everything is API v3 conform. # Additional Changes - move of user and userschema API to resources folder - changed testing and parameters - some renaming # Additional Context closes #7308 --------- Co-authored-by: Elio Bischof <elio@zitadel.com>
52 lines
1.2 KiB
Go
52 lines
1.2 KiB
Go
package user
|
|
|
|
import (
|
|
"google.golang.org/grpc"
|
|
|
|
"github.com/zitadel/zitadel/internal/api/authz"
|
|
"github.com/zitadel/zitadel/internal/api/grpc/server"
|
|
"github.com/zitadel/zitadel/internal/command"
|
|
"github.com/zitadel/zitadel/internal/crypto"
|
|
user "github.com/zitadel/zitadel/pkg/grpc/resources/user/v3alpha"
|
|
)
|
|
|
|
var _ user.ZITADELUsersServer = (*Server)(nil)
|
|
|
|
type Server struct {
|
|
user.UnimplementedZITADELUsersServer
|
|
command *command.Commands
|
|
userCodeAlg crypto.EncryptionAlgorithm
|
|
}
|
|
|
|
type Config struct{}
|
|
|
|
func CreateServer(
|
|
command *command.Commands,
|
|
userCodeAlg crypto.EncryptionAlgorithm,
|
|
) *Server {
|
|
return &Server{
|
|
command: command,
|
|
userCodeAlg: userCodeAlg,
|
|
}
|
|
}
|
|
|
|
func (s *Server) RegisterServer(grpcServer *grpc.Server) {
|
|
user.RegisterZITADELUsersServer(grpcServer, s)
|
|
}
|
|
|
|
func (s *Server) AppName() string {
|
|
return user.ZITADELUsers_ServiceDesc.ServiceName
|
|
}
|
|
|
|
func (s *Server) MethodPrefix() string {
|
|
return user.ZITADELUsers_ServiceDesc.ServiceName
|
|
}
|
|
|
|
func (s *Server) AuthMethods() authz.MethodMapping {
|
|
return user.ZITADELUsers_AuthMethods
|
|
}
|
|
|
|
func (s *Server) RegisterGateway() server.RegisterGatewayFunc {
|
|
return user.RegisterZITADELUsersHandler
|
|
}
|