Documentation
¶
Index ¶
- type AuthHandler
- func (h *AuthHandler) GetOAuthCodeURL(ctx context.Context, req *userpb.GetOAuthCodeURLRequest) (*userpb.GetOAuthCodeURLResponse, error)
- func (h *AuthHandler) GetUserToken(ctx context.Context, req *userpb.GetUserTokenRequest) (*userpb.UserToken, error)
- func (h *AuthHandler) LoginByOAuth(ctx context.Context, req *userpb.LoginByOAuthRequest) (*userpb.LoginSession, error)
- func (h *AuthHandler) LoginByPassword(ctx context.Context, req *userpb.LoginByPasswordRequest) (*userpb.LoginSession, error)
- type UserHandler
- func (h *UserHandler) CreateUser(ctx context.Context, req *userpb.CreateUserRequest) (*emptypb.Empty, error)
- func (h *UserHandler) DeleteUser(ctx context.Context, req *userpb.DeleteUserRequest) (*emptypb.Empty, error)
- func (h *UserHandler) GetCurrentUser(ctx context.Context, req *emptypb.Empty) (*userpb.User, error)
- func (h *UserHandler) GetUser(ctx context.Context, req *userpb.GetUserRequest) (*userpb.User, error)
- func (h *UserHandler) ListUsers(ctx context.Context, req *userpb.ListUsersRequest) (*userpb.ListUsersResponse, error)
- func (h *UserHandler) UpdateUser(ctx context.Context, req *userpb.UpdateUserRequest) (*emptypb.Empty, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthHandler ¶
type AuthHandler struct { userpb.UnimplementedAuthServiceServer // contains filtered or unexported fields }
func NewAuthHandler ¶
func NewAuthHandler( db *gorm.DB, rdb redis.UniversalClient, sessionService service.SessionService, oauthService service.OAuthService, ) *AuthHandler
func (*AuthHandler) GetOAuthCodeURL ¶
func (h *AuthHandler) GetOAuthCodeURL( ctx context.Context, req *userpb.GetOAuthCodeURLRequest, ) (*userpb.GetOAuthCodeURLResponse, error)
GetOAuthCodeURL generates OAuth authorization URL with embedded CSRF protection
func (*AuthHandler) GetUserToken ¶
func (h *AuthHandler) GetUserToken( ctx context.Context, req *userpb.GetUserTokenRequest, ) (*userpb.UserToken, error)
GetUserToken generates JWT token for authenticated users
func (*AuthHandler) LoginByOAuth ¶
func (h *AuthHandler) LoginByOAuth( ctx context.Context, req *userpb.LoginByOAuthRequest, ) (*userpb.LoginSession, error)
LoginByOAuth handles OAuth login flow with CSRF protection
func (*AuthHandler) LoginByPassword ¶
func (h *AuthHandler) LoginByPassword( ctx context.Context, req *userpb.LoginByPasswordRequest, ) (*userpb.LoginSession, error)
LoginByPassword handles password-based login
type UserHandler ¶
type UserHandler struct { userpb.UnimplementedUserServiceServer // contains filtered or unexported fields }
func NewUserHandler ¶
func NewUserHandler(userService service.UserService) *UserHandler
func (*UserHandler) CreateUser ¶
func (h *UserHandler) CreateUser( ctx context.Context, req *userpb.CreateUserRequest, ) (*emptypb.Empty, error)
func (*UserHandler) DeleteUser ¶
func (h *UserHandler) DeleteUser( ctx context.Context, req *userpb.DeleteUserRequest, ) (*emptypb.Empty, error)
func (*UserHandler) GetCurrentUser ¶
func (*UserHandler) GetUser ¶
func (h *UserHandler) GetUser( ctx context.Context, req *userpb.GetUserRequest, ) (*userpb.User, error)
func (*UserHandler) ListUsers ¶
func (h *UserHandler) ListUsers( ctx context.Context, req *userpb.ListUsersRequest, ) (*userpb.ListUsersResponse, error)
func (*UserHandler) UpdateUser ¶
func (h *UserHandler) UpdateUser( ctx context.Context, req *userpb.UpdateUserRequest, ) (*emptypb.Empty, error)
Click to show internal directories.
Click to hide internal directories.