authentication

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CategoryAuthentication

type CategoryAuthentication struct {
	OptionService   service.OptionService
	CategoryService service.CategoryService
}

func NewCategoryAuthentication

func NewCategoryAuthentication(
	optionService service.OptionService,
	categoryService service.CategoryService,
) *CategoryAuthentication

func (*CategoryAuthentication) Authenticate

func (c *CategoryAuthentication) Authenticate(ctx context.Context, token string, id int32, password string) (string, error)

Authenticate implements ContentAuthentication

func (*CategoryAuthentication) IsAuthenticated

func (c *CategoryAuthentication) IsAuthenticated(ctx context.Context, tokenStr string, id int32) (bool, error)

type ContentAuthentication

type ContentAuthentication interface {
	Authenticate(ctx context.Context, token string, id int32, password string) (string, error)
	IsAuthenticated(ctx context.Context, token string, id int32) (bool, error)
}

type PostAuthentication

type PostAuthentication struct {
	OptionService       service.OptionService
	PostService         service.PostService
	PostCategoryService service.PostCategoryService
	CategoryService     service.CategoryService
}

func NewPostAuthentication

func NewPostAuthentication(
	optionService service.OptionService,
	postService service.PostService,
	categoryService service.CategoryService,
	postCategoryService service.PostCategoryService,
) *PostAuthentication

func (*PostAuthentication) Authenticate

func (p *PostAuthentication) Authenticate(ctx context.Context, token string, id int32, password string) (string, error)

func (*PostAuthentication) IsAuthenticated

func (p *PostAuthentication) IsAuthenticated(ctx context.Context, tokenStr string, id int32) (bool, error)

Jump to

Keyboard shortcuts

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