Versions in this module Expand all Collapse all v0 v0.0.4 Jul 9, 2022 Changes in this version + var ProviderSet = wire.NewSet(NewGrpcServerRegister, NewHttpServerRegister, NewUserRoleContrib, ...) + func FindUserByUsernameAndValidatePwd(ctx context.Context, um *biz.UserManager, username, password string) (*biz.User, error) + func MapBizRoleToApi(u *biz.Role, b *pb.Role) + func MapBizUserToApi(ctx context.Context, u *biz.User, b blob.Factory) *pb.User + func NewHydra(c *kconf.Security) *client.APIClient + type AccountService struct + func NewAccountService(um *biz.UserManager, blob blob.Factory, tenantService v13.TenantServiceServer, ...) *AccountService + func (s *AccountService) CreateAddresses(ctx context.Context, req *pb.CreateAddressesRequest) (*pb.CreateAddressReply, error) + func (s *AccountService) DeleteAddresses(ctx context.Context, req *pb.DeleteAddressRequest) (*pb.DeleteAddressesReply, error) + func (s *AccountService) GetAddresses(ctx context.Context, req *pb.GetAddressesRequest) (*pb.GetAddressesReply, error) + func (s *AccountService) GetProfile(ctx context.Context, req *pb.GetProfileRequest) (*pb.GetProfileResponse, error) + func (s *AccountService) GetSettings(ctx context.Context, req *pb.GetSettingsRequest) (*pb.GetSettingsResponse, error) + func (s *AccountService) UpdateAddresses(ctx context.Context, req *pb.UpdateAddressesRequest) (*pb.UpdateAddressesReply, error) + func (s *AccountService) UpdateAvatar(ctx http.Context) error + func (s *AccountService) UpdateProfile(ctx context.Context, req *pb.UpdateProfileRequest) (*pb.UpdateProfileResponse, error) + func (s *AccountService) UpdateSettings(ctx context.Context, req *pb.UpdateSettingsRequest) (*pb.UpdateSettingsResponse, error) + type AuthService struct + func NewAuthService(um *biz.UserManager, rm *biz.RoleManager, token jwt.Tokenizer, ...) *AuthService + func (s *AuthService) ChangePasswordByForget(ctx context.Context, req *pb.ChangePasswordByForgetRequest) (*pb.ChangePasswordByForgetReply, error) + func (s *AuthService) ChangePasswordByPre(ctx context.Context, req *pb.ChangePasswordByPreRequest) (*pb.ChangePasswordByPreReply, error) + func (s *AuthService) ForgetPassword(ctx context.Context, req *pb.ForgetPasswordRequest) (*pb.ForgetPasswordReply, error) + func (s *AuthService) GetCsrfToken(ctx context.Context, req *pb.GetCsrfTokenRequest) (*pb.GetCsrfTokenResponse, error) + func (s *AuthService) Login(ctx context.Context, req *pb.LoginAuthRequest) (*pb.LoginAuthReply, error) + func (s *AuthService) LoginPasswordless(ctx context.Context, req *pb.LoginPasswordlessRequest) (*pb.LoginPasswordlessReply, error) + func (s *AuthService) Refresh(ctx context.Context, req *pb.RefreshTokenAuthRequest) (*pb.RefreshTokenAuthReply, error) + func (s *AuthService) RefreshRememberToken(ctx context.Context, req *pb.RefreshRememberTokenRequest) (*pb.RefreshRememberTokenReply, error) + func (s *AuthService) Register(ctx context.Context, req *pb.RegisterAuthRequest) (*pb.RegisterAuthReply, error) + func (s *AuthService) SendForgetPasswordToken(ctx context.Context, req *pb.ForgetPasswordTokenRequest) (*pb.ForgetPasswordTokenReply, error) + func (s *AuthService) SendPasswordlessToken(ctx context.Context, req *pb.PasswordlessTokenAuthRequest) (*pb.PasswordlessTokenAuthReply, error) + func (s *AuthService) Token(ctx context.Context, req *pb.TokenRequest) (*pb.TokenReply, error) + func (s *AuthService) ValidatePassword(ctx context.Context, req *pb.ValidatePasswordRequest) (*pb.ValidatePasswordReply, error) + type GrpcServerRegister server.GrpcServiceRegister + func NewGrpcServerRegister(user *UserService, account *AccountService, auth *AuthService, ...) GrpcServerRegister + type HttpServerRegister server.HttpServiceRegister + func NewHttpServerRegister(user *UserService, resEncoder khttp.EncodeResponseFunc, ...) HttpServerRegister + type PermissionService struct + func NewPermissionService(auth authz.Service, permissionMgr authz.PermissionManagementService, ...) *PermissionService + func (s *PermissionService) AddSubjectPermission(ctx context.Context, req *pb.AddSubjectPermissionRequest) (*pb.AddSubjectPermissionResponse, error) + func (s *PermissionService) CheckCurrent(ctx context.Context, req *pb.CheckPermissionRequest) (*pb.CheckPermissionReply, error) + func (s *PermissionService) CheckForSubjects(ctx context.Context, req *pb.CheckSubjectsPermissionRequest) (*pb.CheckSubjectsPermissionReply, error) + func (s *PermissionService) GetCurrent(ctx context.Context, req *pb.GetCurrentPermissionRequest) (*pb.GetCurrentPermissionReply, error) + func (s *PermissionService) ListSubjectPermission(ctx context.Context, req *pb.ListSubjectPermissionRequest) (*pb.ListSubjectPermissionResponse, error) + func (s *PermissionService) RemoveSubjectPermission(ctx context.Context, req *pb.RemoveSubjectPermissionRequest) (*pb.RemoveSubjectPermissionReply, error) + func (s *PermissionService) UpdateSubjectPermission(ctx context.Context, req *pb.UpdateSubjectPermissionRequest) (*pb.UpdateSubjectPermissionResponse, error) + type RoleService struct + func NewRoleServiceService(repo *biz.RoleManager, auth authz.Service, ...) *RoleService + func (s *RoleService) CreateRole(ctx context.Context, req *pb.CreateRoleRequest) (*pb.Role, error) + func (s *RoleService) DeleteRole(ctx context.Context, req *pb.DeleteRoleRequest) (*pb.DeleteRoleResponse, error) + func (s *RoleService) GetRole(ctx context.Context, req *pb.GetRoleRequest) (*pb.Role, error) + func (s *RoleService) GetRolePermission(ctx context.Context, req *pb.GetRolePermissionRequest) (*pb.GetRolePermissionResponse, error) + func (s *RoleService) ListRoles(ctx context.Context, req *pb.ListRolesRequest) (*pb.ListRolesResponse, error) + func (s *RoleService) UpdateRole(ctx context.Context, req *pb.UpdateRoleRequest) (*pb.Role, error) + func (s *RoleService) UpdateRolePermission(ctx context.Context, req *pb.UpdateRolePermissionRequest) (*pb.UpdateRolePermissionResponse, error) + type UserRoleContrib struct + func NewUserRoleContrib(userRepo biz.UserRepo) *UserRoleContrib + func (u *UserRoleContrib) Process(ctx context.Context, subject authz.Subject) ([]authz.Subject, error) + type UserService struct + func NewUserService(um *biz.UserManager, rm *biz.RoleManager, auth authz.Service, ...) *UserService + func (s *UserService) CheckUserTenant(ctx context.Context, req *pb.CheckUserTenantRequest) (*pb.CheckUserTenantReply, error) + func (s *UserService) CheckUserTenantInternal(ctx context.Context, userId, tenantId string) (bool, error) + func (s *UserService) CreateUser(ctx context.Context, req *pb.CreateUserRequest) (*pb.User, error) + func (s *UserService) DeleteUser(ctx context.Context, req *pb.DeleteUserRequest) (*pb.DeleteUserResponse, error) + func (s *UserService) GetUser(ctx context.Context, req *pb.GetUserRequest) (*pb.User, error) + func (s *UserService) GetUserRoles(ctx context.Context, req *pb.GetUserRoleRequest) (*pb.GetUserRoleReply, error) + func (s *UserService) InviteUser(ctx context.Context, req *pb.InviteUserRequest) (*pb.InviteUserReply, error) + func (s *UserService) ListUsers(ctx context.Context, req *pb.ListUsersRequest) (*pb.ListUsersResponse, error) + func (s *UserService) UpdateAvatar(ctx http.Context) error + func (s *UserService) UpdateUser(ctx context.Context, req *pb.UpdateUserRequest) (*pb.User, error)