More changes
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 26s
All checks were successful
Golan Testing / testing (1.24.x, ubuntu-latest) (push) Successful in 26s
This commit is contained in:
@ -240,11 +240,12 @@ func New(config *config.Config) (*Client, error) {
|
||||
}
|
||||
// client.logger.Debug("unmarshaled json data", "request", "auth", "type", "sessionData", "body", sd)
|
||||
|
||||
if client.isRegistered {
|
||||
client.logger.Debug("Client authentication successful", "isRegistered", sd.DeviceRegistered)
|
||||
if sd.DeviceRegistered && sd.RegisteredDevicePermanent {
|
||||
client.logger.Debug("client authentication successful")
|
||||
client.isAuthenticated = true
|
||||
client.isRegistered = sd.DeviceRegistered
|
||||
client.isRegistered = true
|
||||
} else {
|
||||
client.logger.Debug("client authentication successful, but devices is not registered")
|
||||
client.registerDevice()
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user