forked from P-E-D-L/proclone
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtypes.go
More file actions
32 lines (25 loc) · 769 Bytes
/
types.go
File metadata and controls
32 lines (25 loc) · 769 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package auth
import (
"github.com/cpp-cyber/proclone/internal/ldap"
)
// =================================================
// Auth Service Interface
// =================================================
type Service interface {
// Authentication
Authenticate(username, password string) (bool, error)
IsAdmin(username string) (bool, error)
IsCreator(username string) (bool, error)
// Health and Connection
HealthCheck() error
Reconnect() error
}
type AuthService struct {
ldapService ldap.Service
}
// =================================================
// Types for Auth Service (re-exported from ldap)
// =================================================
type User = ldap.User
type Group = ldap.Group
type UserRegistrationInfo = ldap.UserRegistrationInfo