-
Notifications
You must be signed in to change notification settings - Fork 27
/
Copy pathUserRecord.swift
54 lines (49 loc) · 1.54 KB
/
UserRecord.swift
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
//
// UserRecord.swift
// nomad-ad
//
// Created by Joel Rennich on 9/9/17.
// Copyright © 2018 Orchard & Grove Inc. All rights reserved.
//
import Foundation
public protocol NoMADUserRecord {
var firstName: String { get }
var lastName: String { get }
var fullName: String { get }
var shortName: String { get }
var upn: String { get }
var email: String? { get }
var groups: [String] { get }
var homeDirectory: String? { get }
var passwordSet: Date { get }
var passwordExpire: Date? { get }
var uacFlags: Int? { get }
}
public struct ADUserRecord: NoMADUserRecord, Equatable {
public let type : LDAPType = .AD
public var userPrincipal : String
public var firstName: String
public var lastName: String
public var fullName: String
public var shortName: String
public var upn: String
public var email: String?
public var groups: [String]
public var homeDirectory: String?
public var passwordSet: Date
public var passwordExpire: Date?
public var uacFlags: Int?
public var passwordAging: Bool?
public var computedExireDate: Date?
public var updatedLast: Date
public var domain: String
public var cn: String
public var pso: String?
public var passwordLength: Int?
public var ntName: String
public var customAttributes: [String:Any]?
public var rawAttributes:[String:String]?
public static func ==(lhs: ADUserRecord, rhs: ADUserRecord) -> Bool {
return (lhs.firstName == rhs.firstName && lhs.lastName == rhs.lastName)
}
}