Merge branch 'master' of gitorious.org:moonshot-identity-client/moonshot-client
[moonshot-ui.git] / src / moonshot-id.vala
1 public class TrustAnchor : Object
2 {
3   public string ca_cert {get; set; default = "";}
4   public string subject {get; set; default = "";}
5   public string subject_alt  {get; set; default = "";}
6   public string server_cert  {get; set; default = "";}
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 = ""; }
20   
21   public string username { get; set; default = ""; }
22   public string password { get; set; default = null; }
23
24   public string issuer { get; set; default = ""; }
25   
26   public Rule[] rules {get; set; default = {};}
27   public string[] services { get; set; default = {}; }
28
29   public TrustAnchor trust_anchor  { get; set; default = new TrustAnchor (); }
30   
31   public Gdk.Pixbuf pixbuf { get; set; default = null; }    
32
33   public unowned string nai { get {  _nai = username + "@" + issuer; return _nai;}}
34 }