Merge branch 'master' of ssh://69.25.196.28:822/srv/git/moonshot-ui
[moonshot-ui.git] / src / moonshot-id.vala
1 public class TrustAnchor : Object
2 {
3   public string ca_cert {get; set; default = null;}
4   public string subject {get; set; default = null;}
5   public string subject_alt  {get; set; default = null;}
6   public string server_cert  {get; set; default = null;}
7 }
8
9 public struct Rule
10 {
11   public string pattern;
12   public string always_confirm;
13 }
14
15 public class IdCard : Object
16 {
17   private string _nai;
18   
19   public string display_name { get; set; default = null; }
20   
21   public string username { get; set; default = null; }
22   public string password { get; set; default = null; }
23
24   public string issuer { get; set; default = null; }
25   
26   public Rule[] rules {get; set; default = {};}
27   public string[] services { get; set; default = {}; }
28
29
30   public TrustAnchor trust_anchor  { get; set; default = new TrustAnchor (); }
31   
32   public Gdk.Pixbuf pixbuf { get; set; default = null; }    
33
34   //TODO: Set the getter and remove the setter/default
35   public unowned string nai { get {  _nai = username + "@" + password; return _nai;}}
36 }