Documentation
¶
Index ¶
- Constants
- type AuthPersistencyLayer
- type AuthService
- func (as *AuthService) AuthLogin(message event.LoginEvent, psk security.PSK) (authInfo event.LoginResponse, err error)
- func (as *AuthService) AuthLogout()
- func (as *AuthService) IsAuthenticated() bool
- func (as *AuthService) PrivateKey() ed25519.PrivateKey
- func (as *AuthService) Storage() AuthPersistencyLayer
- type UserPersistencyLayer
Constants ¶
View Source
const ( ErrUsernamesMismatch warpnet.WarpError = "username doesn't exist" ErrAlreadyAuthenticated warpnet.WarpError = "already authenticated" )
View Source
const ( MinPasswordLength = 8 MaxPasswordLength = 32 ErrEmptyPassword warpnet.WarpError = "empty password" ErrMinPasswordLength warpnet.WarpError = "password must be at least 8 characters" ErrMaxPasswordLength warpnet.WarpError = "password must be at least 32 characters" ErrPasswordUpperCaseRequired warpnet.WarpError = "password must have at least one uppercase letter" ErrPasswordLowerCaseRequired warpnet.WarpError = "password must have at least one lowercase letter" ErrPasswordDigitRequired warpnet.WarpError = "password must have at least one digit" ErrPasswordSpecialRequired warpnet.WarpError = "password must have at least one special character" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthPersistencyLayer ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService( ctx context.Context, authRepo AuthPersistencyLayer, userRepo UserPersistencyLayer, authReady chan domain.AuthNodeInfo, ) *AuthService
func (*AuthService) AuthLogin ¶
func (as *AuthService) AuthLogin(message event.LoginEvent, psk security.PSK) (authInfo event.LoginResponse, err error)
func (*AuthService) AuthLogout ¶ added in v0.6.175
func (as *AuthService) AuthLogout()
func (*AuthService) IsAuthenticated ¶
func (as *AuthService) IsAuthenticated() bool
func (*AuthService) PrivateKey ¶
func (as *AuthService) PrivateKey() ed25519.PrivateKey
func (*AuthService) Storage ¶
func (as *AuthService) Storage() AuthPersistencyLayer
Click to show internal directories.
Click to hide internal directories.