Initial commit
This commit is contained in:
17
internal/auth/services/pam_auth_service.go
Normal file
17
internal/auth/services/pam_auth_service.go
Normal file
@ -0,0 +1,17 @@
|
||||
package services
|
||||
|
||||
import "git.cesium.pw/niku/virteen/internal/auth/repositories"
|
||||
|
||||
type PamAuthService struct {
|
||||
pam *repositories.PamRepository
|
||||
}
|
||||
|
||||
func NewPamAuthService() *PamAuthService {
|
||||
return &PamAuthService{
|
||||
pam: repositories.NewPamRepository(),
|
||||
}
|
||||
}
|
||||
|
||||
func (pas PamAuthService) IsValidUser(user, password string) bool {
|
||||
return pas.pam.IsValidUser(user, password)
|
||||
}
|
Reference in New Issue
Block a user