auth

package
v1.167.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthenticateUserRequest

type AuthenticateUserRequest struct {
	Credentials *services.Credentials
}

AuthenticateUserRequest represents the input for user authentication

type AuthenticateUserResponse

type AuthenticateUserResponse struct {
	User        *entities.User
	APIKey      *services.APIKey
	Permissions []entities.Permission
}

AuthenticateUserResponse represents the output of user authentication

type AuthenticateUserUseCase

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

AuthenticateUserUseCase handles user authentication

func NewAuthenticateUserUseCase

func NewAuthenticateUserUseCase(
	userRepo repositories.UserRepository,
	authService services.AuthService,
) *AuthenticateUserUseCase

NewAuthenticateUserUseCase creates a new AuthenticateUserUseCase

func (*AuthenticateUserUseCase) Execute

Execute authenticates a user with the given credentials

type GitHubAuthenticateRequest

type GitHubAuthenticateRequest struct {
	Token string
}

GitHubAuthenticateRequest represents the input for GitHub authentication

type GitHubAuthenticateResponse

type GitHubAuthenticateResponse struct {
	User        *entities.User
	APIKey      *services.APIKey
	Permissions []entities.Permission
	GitHubInfo  *entities.GitHubUserInfo
}

GitHubAuthenticateResponse represents the output of GitHub authentication

type GitHubAuthenticateUseCase

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

GitHubAuthenticateUseCase handles GitHub authentication

func NewGitHubAuthenticateUseCase

func NewGitHubAuthenticateUseCase(
	userRepo repositories.UserRepository,
	authService services.AuthService,
	githubAuthService services.GitHubAuthService,
) *GitHubAuthenticateUseCase

NewGitHubAuthenticateUseCase creates a new GitHubAuthenticateUseCase

func (*GitHubAuthenticateUseCase) Execute

Execute authenticates a user using GitHub token

type ValidateAPIKeyRequest

type ValidateAPIKeyRequest struct {
	APIKey string
}

ValidateAPIKeyRequest represents the input for API key validation

type ValidateAPIKeyResponse

type ValidateAPIKeyResponse struct {
	User        *entities.User
	Permissions []entities.Permission
	Valid       bool
}

ValidateAPIKeyResponse represents the output of API key validation

type ValidateAPIKeyUseCase

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

ValidateAPIKeyUseCase handles API key validation

func NewValidateAPIKeyUseCase

func NewValidateAPIKeyUseCase(
	userRepo repositories.UserRepository,
	authService services.AuthService,
) *ValidateAPIKeyUseCase

NewValidateAPIKeyUseCase creates a new ValidateAPIKeyUseCase

func (*ValidateAPIKeyUseCase) Execute

Execute validates an API key and returns the associated user

type ValidatePermissionRequest

type ValidatePermissionRequest struct {
	User       *entities.User
	Permission entities.Permission
}

ValidatePermissionRequest represents the input for permission validation

type ValidatePermissionResponse

type ValidatePermissionResponse struct {
	HasPermission bool
	Error         error
}

ValidatePermissionResponse represents the output of permission validation

type ValidatePermissionUseCase

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

ValidatePermissionUseCase handles permission validation

func NewValidatePermissionUseCase

func NewValidatePermissionUseCase(
	authService services.AuthService,
) *ValidatePermissionUseCase

NewValidatePermissionUseCase creates a new ValidatePermissionUseCase

func (*ValidatePermissionUseCase) Execute

Execute validates if a user has a specific permission

Jump to

Keyboard shortcuts

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