Initial commit: Open sourcing all of the Maple Open Technologies code.
This commit is contained in:
commit
755d54a99d
2010 changed files with 448675 additions and 0 deletions
|
|
@ -0,0 +1,35 @@
|
|||
package site
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"go.uber.org/zap"
|
||||
|
||||
siteusecase "codeberg.org/mapleopentech/monorepo/cloud/maplepress-backend/internal/usecase/site"
|
||||
)
|
||||
|
||||
// AuthenticateAPIKeyService handles API key authentication operations
|
||||
type AuthenticateAPIKeyService interface {
|
||||
AuthenticateByAPIKey(ctx context.Context, input *siteusecase.AuthenticateAPIKeyInput) (*siteusecase.AuthenticateAPIKeyOutput, error)
|
||||
}
|
||||
|
||||
type authenticateAPIKeyService struct {
|
||||
authenticateUC *siteusecase.AuthenticateAPIKeyUseCase
|
||||
logger *zap.Logger
|
||||
}
|
||||
|
||||
// NewAuthenticateAPIKeyService creates a new AuthenticateAPIKeyService
|
||||
func NewAuthenticateAPIKeyService(
|
||||
authenticateUC *siteusecase.AuthenticateAPIKeyUseCase,
|
||||
logger *zap.Logger,
|
||||
) AuthenticateAPIKeyService {
|
||||
return &authenticateAPIKeyService{
|
||||
authenticateUC: authenticateUC,
|
||||
logger: logger.Named("authenticate-apikey-service"),
|
||||
}
|
||||
}
|
||||
|
||||
// AuthenticateByAPIKey authenticates an API key
|
||||
func (s *authenticateAPIKeyService) AuthenticateByAPIKey(ctx context.Context, input *siteusecase.AuthenticateAPIKeyInput) (*siteusecase.AuthenticateAPIKeyOutput, error) {
|
||||
return s.authenticateUC.Execute(ctx, input)
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue