This file is indexed.

/usr/lib/python3/dist-packages/lasso.py is in python3-lasso 2.5.0-3ubuntu2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

   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
  55
  56
  57
  58
  59
  60
  61
  62
  63
  64
  65
  66
  67
  68
  69
  70
  71
  72
  73
  74
  75
  76
  77
  78
  79
  80
  81
  82
  83
  84
  85
  86
  87
  88
  89
  90
  91
  92
  93
  94
  95
  96
  97
  98
  99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
 311
 312
 313
 314
 315
 316
 317
 318
 319
 320
 321
 322
 323
 324
 325
 326
 327
 328
 329
 330
 331
 332
 333
 334
 335
 336
 337
 338
 339
 340
 341
 342
 343
 344
 345
 346
 347
 348
 349
 350
 351
 352
 353
 354
 355
 356
 357
 358
 359
 360
 361
 362
 363
 364
 365
 366
 367
 368
 369
 370
 371
 372
 373
 374
 375
 376
 377
 378
 379
 380
 381
 382
 383
 384
 385
 386
 387
 388
 389
 390
 391
 392
 393
 394
 395
 396
 397
 398
 399
 400
 401
 402
 403
 404
 405
 406
 407
 408
 409
 410
 411
 412
 413
 414
 415
 416
 417
 418
 419
 420
 421
 422
 423
 424
 425
 426
 427
 428
 429
 430
 431
 432
 433
 434
 435
 436
 437
 438
 439
 440
 441
 442
 443
 444
 445
 446
 447
 448
 449
 450
 451
 452
 453
 454
 455
 456
 457
 458
 459
 460
 461
 462
 463
 464
 465
 466
 467
 468
 469
 470
 471
 472
 473
 474
 475
 476
 477
 478
 479
 480
 481
 482
 483
 484
 485
 486
 487
 488
 489
 490
 491
 492
 493
 494
 495
 496
 497
 498
 499
 500
 501
 502
 503
 504
 505
 506
 507
 508
 509
 510
 511
 512
 513
 514
 515
 516
 517
 518
 519
 520
 521
 522
 523
 524
 525
 526
 527
 528
 529
 530
 531
 532
 533
 534
 535
 536
 537
 538
 539
 540
 541
 542
 543
 544
 545
 546
 547
 548
 549
 550
 551
 552
 553
 554
 555
 556
 557
 558
 559
 560
 561
 562
 563
 564
 565
 566
 567
 568
 569
 570
 571
 572
 573
 574
 575
 576
 577
 578
 579
 580
 581
 582
 583
 584
 585
 586
 587
 588
 589
 590
 591
 592
 593
 594
 595
 596
 597
 598
 599
 600
 601
 602
 603
 604
 605
 606
 607
 608
 609
 610
 611
 612
 613
 614
 615
 616
 617
 618
 619
 620
 621
 622
 623
 624
 625
 626
 627
 628
 629
 630
 631
 632
 633
 634
 635
 636
 637
 638
 639
 640
 641
 642
 643
 644
 645
 646
 647
 648
 649
 650
 651
 652
 653
 654
 655
 656
 657
 658
 659
 660
 661
 662
 663
 664
 665
 666
 667
 668
 669
 670
 671
 672
 673
 674
 675
 676
 677
 678
 679
 680
 681
 682
 683
 684
 685
 686
 687
 688
 689
 690
 691
 692
 693
 694
 695
 696
 697
 698
 699
 700
 701
 702
 703
 704
 705
 706
 707
 708
 709
 710
 711
 712
 713
 714
 715
 716
 717
 718
 719
 720
 721
 722
 723
 724
 725
 726
 727
 728
 729
 730
 731
 732
 733
 734
 735
 736
 737
 738
 739
 740
 741
 742
 743
 744
 745
 746
 747
 748
 749
 750
 751
 752
 753
 754
 755
 756
 757
 758
 759
 760
 761
 762
 763
 764
 765
 766
 767
 768
 769
 770
 771
 772
 773
 774
 775
 776
 777
 778
 779
 780
 781
 782
 783
 784
 785
 786
 787
 788
 789
 790
 791
 792
 793
 794
 795
 796
 797
 798
 799
 800
 801
 802
 803
 804
 805
 806
 807
 808
 809
 810
 811
 812
 813
 814
 815
 816
 817
 818
 819
 820
 821
 822
 823
 824
 825
 826
 827
 828
 829
 830
 831
 832
 833
 834
 835
 836
 837
 838
 839
 840
 841
 842
 843
 844
 845
 846
 847
 848
 849
 850
 851
 852
 853
 854
 855
 856
 857
 858
 859
 860
 861
 862
 863
 864
 865
 866
 867
 868
 869
 870
 871
 872
 873
 874
 875
 876
 877
 878
 879
 880
 881
 882
 883
 884
 885
 886
 887
 888
 889
 890
 891
 892
 893
 894
 895
 896
 897
 898
 899
 900
 901
 902
 903
 904
 905
 906
 907
 908
 909
 910
 911
 912
 913
 914
 915
 916
 917
 918
 919
 920
 921
 922
 923
 924
 925
 926
 927
 928
 929
 930
 931
 932
 933
 934
 935
 936
 937
 938
 939
 940
 941
 942
 943
 944
 945
 946
 947
 948
 949
 950
 951
 952
 953
 954
 955
 956
 957
 958
 959
 960
 961
 962
 963
 964
 965
 966
 967
 968
 969
 970
 971
 972
 973
 974
 975
 976
 977
 978
 979
 980
 981
 982
 983
 984
 985
 986
 987
 988
 989
 990
 991
 992
 993
 994
 995
 996
 997
 998
 999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
2516
2517
2518
2519
2520
2521
2522
2523
2524
2525
2526
2527
2528
2529
2530
2531
2532
2533
2534
2535
2536
2537
2538
2539
2540
2541
2542
2543
2544
2545
2546
2547
2548
2549
2550
2551
2552
2553
2554
2555
2556
2557
2558
2559
2560
2561
2562
2563
2564
2565
2566
2567
2568
2569
2570
2571
2572
2573
2574
2575
2576
2577
2578
2579
2580
2581
2582
2583
2584
2585
2586
2587
2588
2589
2590
2591
2592
2593
2594
2595
2596
2597
2598
2599
2600
2601
2602
2603
2604
2605
2606
2607
2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
2675
2676
2677
2678
2679
2680
2681
2682
2683
2684
2685
2686
2687
2688
2689
2690
2691
2692
2693
2694
2695
2696
2697
2698
2699
2700
2701
2702
2703
2704
2705
2706
2707
2708
2709
2710
2711
2712
2713
2714
2715
2716
2717
2718
2719
2720
2721
2722
2723
2724
2725
2726
2727
2728
2729
2730
2731
2732
2733
2734
2735
2736
2737
2738
2739
2740
2741
2742
2743
2744
2745
2746
2747
2748
2749
2750
2751
2752
2753
2754
2755
2756
2757
2758
2759
2760
2761
2762
2763
2764
2765
2766
2767
2768
2769
2770
2771
2772
2773
2774
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
2809
2810
2811
2812
2813
2814
2815
2816
2817
2818
2819
2820
2821
2822
2823
2824
2825
2826
2827
2828
2829
2830
2831
2832
2833
2834
2835
2836
2837
2838
2839
2840
2841
2842
2843
2844
2845
2846
2847
2848
2849
2850
2851
2852
2853
2854
2855
2856
2857
2858
2859
2860
2861
2862
2863
2864
2865
2866
2867
2868
2869
2870
2871
2872
2873
2874
2875
2876
2877
2878
2879
2880
2881
2882
2883
2884
2885
2886
2887
2888
2889
2890
2891
2892
2893
2894
2895
2896
2897
2898
2899
2900
2901
2902
2903
2904
2905
2906
2907
2908
2909
2910
2911
2912
2913
2914
2915
2916
2917
2918
2919
2920
2921
2922
2923
2924
2925
2926
2927
2928
2929
2930
2931
2932
2933
2934
2935
2936
2937
2938
2939
2940
2941
2942
2943
2944
2945
2946
2947
2948
2949
2950
2951
2952
2953
2954
2955
2956
2957
2958
2959
2960
2961
2962
2963
2964
2965
2966
2967
2968
2969
2970
2971
2972
2973
2974
2975
2976
2977
2978
2979
2980
2981
2982
2983
2984
2985
2986
2987
2988
2989
2990
2991
2992
2993
2994
2995
2996
2997
2998
2999
3000
3001
3002
3003
3004
3005
3006
3007
3008
3009
3010
3011
3012
3013
3014
3015
3016
3017
3018
3019
3020
3021
3022
3023
3024
3025
3026
3027
3028
3029
3030
3031
3032
3033
3034
3035
3036
3037
3038
3039
3040
3041
3042
3043
3044
3045
3046
3047
3048
3049
3050
3051
3052
3053
3054
3055
3056
3057
3058
3059
3060
3061
3062
3063
3064
3065
3066
3067
3068
3069
3070
3071
3072
3073
3074
3075
3076
3077
3078
3079
3080
3081
3082
3083
3084
3085
3086
3087
3088
3089
3090
3091
3092
3093
3094
3095
3096
3097
3098
3099
3100
3101
3102
3103
3104
3105
3106
3107
3108
3109
3110
3111
3112
3113
3114
3115
3116
3117
3118
3119
3120
3121
3122
3123
3124
3125
3126
3127
3128
3129
3130
3131
3132
3133
3134
3135
3136
3137
3138
3139
3140
3141
3142
3143
3144
3145
3146
3147
3148
3149
3150
3151
3152
3153
3154
3155
3156
3157
3158
3159
3160
3161
3162
3163
3164
3165
3166
3167
3168
3169
3170
3171
3172
3173
3174
3175
3176
3177
3178
3179
3180
3181
3182
3183
3184
3185
3186
3187
3188
3189
3190
3191
3192
3193
3194
3195
3196
3197
3198
3199
3200
3201
3202
3203
3204
3205
3206
3207
3208
3209
3210
3211
3212
3213
3214
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
3245
3246
3247
3248
3249
3250
3251
3252
3253
3254
3255
3256
3257
3258
3259
3260
3261
3262
3263
3264
3265
3266
3267
3268
3269
3270
3271
3272
3273
3274
3275
3276
3277
3278
3279
3280
3281
3282
3283
3284
3285
3286
3287
3288
3289
3290
3291
3292
3293
3294
3295
3296
3297
3298
3299
3300
3301
3302
3303
3304
3305
3306
3307
3308
3309
3310
3311
3312
3313
3314
3315
3316
3317
3318
3319
3320
3321
3322
3323
3324
3325
3326
3327
3328
3329
3330
3331
3332
3333
3334
3335
3336
3337
3338
3339
3340
3341
3342
3343
3344
3345
3346
3347
3348
3349
3350
3351
3352
3353
3354
3355
3356
3357
3358
3359
3360
3361
3362
3363
3364
3365
3366
3367
3368
3369
3370
3371
3372
3373
3374
3375
3376
3377
3378
3379
3380
3381
3382
3383
3384
3385
3386
3387
3388
3389
3390
3391
3392
3393
3394
3395
3396
3397
3398
3399
3400
3401
3402
3403
3404
3405
3406
3407
3408
3409
3410
3411
3412
3413
3414
3415
3416
3417
3418
3419
3420
3421
3422
3423
3424
3425
3426
3427
3428
3429
3430
3431
3432
3433
3434
3435
3436
3437
3438
3439
3440
3441
3442
3443
3444
3445
3446
3447
3448
3449
3450
3451
3452
3453
3454
3455
3456
3457
3458
3459
3460
3461
3462
3463
3464
3465
3466
3467
3468
3469
3470
3471
3472
3473
3474
3475
3476
3477
3478
3479
3480
3481
3482
3483
3484
3485
3486
3487
3488
3489
3490
3491
3492
3493
3494
3495
3496
3497
3498
3499
3500
3501
3502
3503
3504
3505
3506
3507
3508
3509
3510
3511
3512
3513
3514
3515
3516
3517
3518
3519
3520
3521
3522
3523
3524
3525
3526
3527
3528
3529
3530
3531
3532
3533
3534
3535
3536
3537
3538
3539
3540
3541
3542
3543
3544
3545
3546
3547
3548
3549
3550
3551
3552
3553
3554
3555
3556
3557
3558
3559
3560
3561
3562
3563
3564
3565
3566
3567
3568
3569
3570
3571
3572
3573
3574
3575
3576
3577
3578
3579
3580
3581
3582
3583
3584
3585
3586
3587
3588
3589
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
3622
3623
3624
3625
3626
3627
3628
3629
3630
3631
3632
3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
3648
3649
3650
3651
3652
3653
3654
3655
3656
3657
3658
3659
3660
3661
3662
3663
3664
3665
3666
3667
3668
3669
3670
3671
3672
3673
3674
3675
3676
3677
3678
3679
3680
3681
3682
3683
3684
3685
3686
3687
3688
3689
3690
3691
3692
3693
3694
3695
3696
3697
3698
3699
3700
3701
3702
3703
3704
3705
3706
3707
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718
3719
3720
3721
3722
3723
3724
3725
3726
3727
3728
3729
3730
3731
3732
3733
3734
3735
3736
3737
3738
3739
3740
3741
3742
3743
3744
3745
3746
3747
3748
3749
3750
3751
3752
3753
3754
3755
3756
3757
3758
3759
3760
3761
3762
3763
3764
3765
3766
3767
3768
3769
3770
3771
3772
3773
3774
3775
3776
3777
3778
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796
3797
3798
3799
3800
3801
3802
3803
3804
3805
3806
3807
3808
3809
3810
3811
3812
3813
3814
3815
3816
3817
3818
3819
3820
3821
3822
3823
3824
3825
3826
3827
3828
3829
3830
3831
3832
3833
3834
3835
3836
3837
3838
3839
3840
3841
3842
3843
3844
3845
3846
3847
3848
3849
3850
3851
3852
3853
3854
3855
3856
3857
3858
3859
3860
3861
3862
3863
3864
3865
3866
3867
3868
3869
3870
3871
3872
3873
3874
3875
3876
3877
3878
3879
3880
3881
3882
3883
3884
3885
3886
3887
3888
3889
3890
3891
3892
3893
3894
3895
3896
3897
3898
3899
3900
3901
3902
3903
3904
3905
3906
3907
3908
3909
3910
3911
3912
3913
3914
3915
3916
3917
3918
3919
3920
3921
3922
3923
3924
3925
3926
3927
3928
3929
3930
3931
3932
3933
3934
3935
3936
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962
3963
3964
3965
3966
3967
3968
3969
3970
3971
3972
3973
3974
3975
3976
3977
3978
3979
3980
3981
3982
3983
3984
3985
3986
3987
3988
3989
3990
3991
3992
3993
3994
3995
3996
3997
3998
3999
4000
4001
4002
4003
4004
4005
4006
4007
4008
4009
4010
4011
4012
4013
4014
4015
4016
4017
4018
4019
4020
4021
4022
4023
4024
4025
4026
4027
4028
4029
4030
4031
4032
4033
4034
4035
4036
4037
4038
4039
4040
4041
4042
4043
4044
4045
4046
4047
4048
4049
4050
4051
4052
4053
4054
4055
4056
4057
4058
4059
4060
4061
4062
4063
4064
4065
4066
4067
4068
4069
4070
4071
4072
4073
4074
4075
4076
4077
4078
4079
4080
4081
4082
4083
4084
4085
4086
4087
4088
4089
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
4202
4203
4204
4205
4206
4207
4208
4209
4210
4211
4212
4213
4214
4215
4216
4217
4218
4219
4220
4221
4222
4223
4224
4225
4226
4227
4228
4229
4230
4231
4232
4233
4234
4235
4236
4237
4238
4239
4240
4241
4242
4243
4244
4245
4246
4247
4248
4249
4250
4251
4252
4253
4254
4255
4256
4257
4258
4259
4260
4261
4262
4263
4264
4265
4266
4267
4268
4269
4270
4271
4272
4273
4274
4275
4276
4277
4278
4279
4280
4281
4282
4283
4284
4285
4286
4287
4288
4289
4290
4291
4292
4293
4294
4295
4296
4297
4298
4299
4300
4301
4302
4303
4304
4305
4306
4307
4308
4309
4310
4311
4312
4313
4314
4315
4316
4317
4318
4319
4320
4321
4322
4323
4324
4325
4326
4327
4328
4329
4330
4331
4332
4333
4334
4335
4336
4337
4338
4339
4340
4341
4342
4343
4344
4345
4346
4347
4348
4349
4350
4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
4384
4385
4386
4387
4388
4389
4390
4391
4392
4393
4394
4395
4396
4397
4398
4399
4400
4401
4402
4403
4404
4405
4406
4407
4408
4409
4410
4411
4412
4413
4414
4415
4416
4417
4418
4419
4420
4421
4422
4423
4424
4425
4426
4427
4428
4429
4430
4431
4432
4433
4434
4435
4436
4437
4438
4439
4440
4441
4442
4443
4444
4445
4446
4447
4448
4449
4450
4451
4452
4453
4454
4455
4456
4457
4458
4459
4460
4461
4462
4463
4464
4465
4466
4467
4468
4469
4470
4471
4472
4473
4474
4475
4476
4477
4478
4479
4480
4481
4482
4483
4484
4485
4486
4487
4488
4489
4490
4491
4492
4493
4494
4495
4496
4497
4498
4499
4500
4501
4502
4503
4504
4505
4506
4507
4508
4509
4510
4511
4512
4513
4514
4515
4516
4517
4518
4519
4520
4521
4522
4523
4524
4525
4526
4527
4528
4529
4530
4531
4532
4533
4534
4535
4536
4537
4538
4539
4540
4541
4542
4543
4544
4545
4546
4547
4548
4549
4550
4551
4552
4553
4554
4555
4556
4557
4558
4559
4560
4561
4562
4563
4564
4565
4566
4567
4568
4569
4570
4571
4572
4573
4574
4575
4576
4577
4578
4579
4580
4581
4582
4583
4584
4585
4586
4587
4588
4589
4590
4591
4592
4593
4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
4629
4630
4631
4632
4633
4634
4635
4636
4637
4638
4639
4640
4641
4642
4643
4644
4645
4646
4647
4648
4649
4650
4651
4652
4653
4654
4655
4656
4657
4658
4659
4660
4661
4662
4663
4664
4665
4666
4667
4668
4669
4670
4671
4672
4673
4674
4675
4676
4677
4678
4679
4680
4681
4682
4683
4684
4685
4686
4687
4688
4689
4690
4691
4692
4693
4694
4695
4696
4697
4698
4699
4700
4701
4702
4703
4704
4705
4706
4707
4708
4709
4710
4711
4712
4713
4714
4715
4716
4717
4718
4719
4720
4721
4722
4723
4724
4725
4726
4727
4728
4729
4730
4731
4732
4733
4734
4735
4736
4737
4738
4739
4740
4741
4742
4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
4825
4826
4827
4828
4829
4830
4831
4832
4833
4834
4835
4836
4837
4838
4839
4840
4841
4842
4843
4844
4845
4846
4847
4848
4849
4850
4851
4852
4853
4854
4855
4856
4857
4858
4859
4860
4861
4862
4863
4864
4865
4866
4867
4868
4869
4870
4871
4872
4873
4874
4875
4876
4877
4878
4879
4880
4881
4882
4883
4884
4885
4886
4887
4888
4889
4890
4891
4892
4893
4894
4895
4896
4897
4898
4899
4900
4901
4902
4903
4904
4905
4906
4907
4908
4909
4910
4911
4912
4913
4914
4915
4916
4917
4918
4919
4920
4921
4922
4923
4924
4925
4926
4927
4928
4929
4930
4931
4932
4933
4934
4935
4936
4937
4938
4939
4940
4941
4942
4943
4944
4945
4946
4947
4948
4949
4950
4951
4952
4953
4954
4955
4956
4957
4958
4959
4960
4961
4962
4963
4964
4965
4966
4967
4968
4969
4970
4971
4972
4973
4974
4975
4976
4977
4978
4979
4980
4981
4982
4983
4984
4985
4986
4987
4988
4989
4990
4991
4992
4993
4994
4995
4996
4997
4998
4999
5000
5001
5002
5003
5004
5005
5006
5007
5008
5009
5010
5011
5012
5013
5014
5015
5016
5017
5018
5019
5020
5021
5022
5023
5024
5025
5026
5027
5028
5029
5030
5031
5032
5033
5034
5035
5036
5037
5038
5039
5040
5041
5042
5043
5044
5045
5046
5047
5048
5049
5050
5051
5052
5053
5054
5055
5056
5057
5058
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073
5074
5075
5076
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091
5092
5093
5094
5095
5096
5097
5098
5099
5100
5101
5102
5103
5104
5105
5106
5107
5108
5109
5110
5111
5112
5113
5114
5115
5116
5117
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132
5133
5134
5135
5136
5137
5138
5139
5140
5141
5142
5143
5144
5145
5146
5147
5148
5149
5150
5151
5152
5153
5154
5155
5156
5157
5158
5159
5160
5161
5162
5163
5164
5165
5166
5167
5168
5169
5170
5171
5172
5173
5174
5175
5176
5177
5178
5179
5180
5181
5182
5183
5184
5185
5186
5187
5188
5189
5190
5191
5192
5193
5194
5195
5196
5197
5198
5199
5200
5201
5202
5203
5204
5205
5206
5207
5208
5209
5210
5211
5212
5213
5214
5215
5216
5217
5218
5219
5220
5221
5222
5223
5224
5225
5226
5227
5228
5229
5230
5231
5232
5233
5234
5235
5236
5237
5238
5239
5240
5241
5242
5243
5244
5245
5246
5247
5248
5249
5250
5251
5252
5253
5254
5255
5256
5257
5258
5259
5260
5261
5262
5263
5264
5265
5266
5267
5268
5269
5270
5271
5272
5273
5274
5275
5276
5277
5278
5279
5280
5281
5282
5283
5284
5285
5286
5287
5288
5289
5290
5291
5292
5293
5294
5295
5296
5297
5298
5299
5300
5301
5302
5303
5304
5305
5306
5307
5308
5309
5310
5311
5312
5313
5314
5315
5316
5317
5318
5319
5320
5321
5322
5323
5324
5325
5326
5327
5328
5329
5330
5331
5332
5333
5334
5335
5336
5337
5338
5339
5340
5341
5342
5343
5344
5345
5346
5347
5348
5349
5350
5351
5352
5353
5354
5355
5356
5357
5358
5359
5360
5361
5362
5363
5364
5365
5366
5367
5368
5369
5370
5371
5372
5373
5374
5375
5376
5377
5378
5379
5380
5381
5382
5383
5384
5385
5386
5387
5388
5389
5390
5391
5392
5393
5394
5395
5396
5397
5398
5399
5400
5401
5402
5403
5404
5405
5406
5407
5408
5409
5410
5411
5412
5413
5414
5415
5416
5417
5418
5419
5420
5421
5422
5423
5424
5425
5426
5427
5428
5429
5430
5431
5432
5433
5434
5435
5436
5437
5438
5439
5440
5441
5442
5443
5444
5445
5446
5447
5448
5449
5450
5451
5452
5453
5454
5455
5456
5457
5458
5459
5460
5461
5462
5463
5464
5465
5466
5467
5468
5469
5470
5471
5472
5473
5474
5475
5476
5477
5478
5479
5480
5481
5482
5483
5484
5485
5486
5487
5488
5489
5490
5491
5492
5493
5494
5495
5496
5497
5498
5499
5500
5501
5502
5503
5504
5505
5506
5507
5508
5509
5510
5511
5512
5513
5514
5515
5516
5517
5518
5519
5520
5521
5522
5523
5524
5525
5526
5527
5528
5529
5530
5531
5532
5533
5534
5535
5536
5537
5538
5539
5540
5541
5542
5543
5544
5545
5546
5547
5548
5549
5550
5551
5552
5553
5554
5555
5556
5557
5558
5559
5560
5561
5562
5563
5564
5565
5566
5567
5568
5569
5570
5571
5572
5573
5574
5575
5576
5577
5578
5579
5580
5581
5582
5583
5584
5585
5586
5587
5588
5589
5590
5591
5592
5593
5594
5595
5596
5597
5598
5599
5600
5601
5602
5603
5604
5605
5606
5607
5608
5609
5610
5611
5612
5613
5614
5615
5616
5617
5618
5619
5620
5621
5622
5623
5624
5625
5626
5627
5628
5629
5630
5631
5632
5633
5634
5635
5636
5637
5638
5639
5640
5641
5642
5643
5644
5645
5646
5647
5648
5649
5650
5651
5652
5653
5654
5655
5656
5657
5658
5659
5660
5661
5662
5663
5664
5665
5666
5667
5668
5669
5670
5671
5672
5673
5674
5675
5676
5677
5678
5679
5680
5681
5682
5683
5684
5685
5686
5687
5688
5689
5690
5691
5692
5693
5694
5695
5696
5697
5698
5699
5700
5701
5702
5703
5704
5705
5706
5707
5708
5709
5710
5711
5712
5713
5714
5715
5716
5717
5718
5719
5720
5721
5722
5723
5724
5725
5726
5727
5728
5729
5730
5731
5732
5733
5734
5735
5736
5737
5738
5739
5740
5741
5742
5743
5744
5745
5746
5747
5748
5749
5750
5751
5752
5753
5754
5755
5756
5757
5758
5759
5760
5761
5762
5763
5764
5765
5766
5767
5768
5769
5770
5771
5772
5773
5774
5775
5776
5777
5778
5779
5780
5781
5782
5783
5784
5785
5786
5787
5788
5789
5790
5791
5792
5793
5794
5795
5796
5797
5798
5799
5800
5801
5802
5803
5804
5805
5806
5807
5808
5809
5810
5811
5812
5813
5814
5815
5816
5817
5818
5819
5820
5821
5822
5823
5824
5825
5826
5827
5828
5829
5830
5831
5832
5833
5834
5835
5836
5837
5838
5839
5840
5841
5842
5843
5844
5845
5846
5847
5848
5849
5850
5851
5852
5853
5854
5855
5856
5857
5858
5859
5860
5861
5862
5863
5864
5865
5866
5867
5868
5869
5870
5871
5872
5873
5874
5875
5876
5877
5878
5879
5880
5881
5882
5883
5884
5885
5886
5887
5888
5889
5890
5891
5892
5893
5894
5895
5896
5897
5898
5899
5900
5901
5902
5903
5904
5905
5906
5907
5908
5909
5910
5911
5912
5913
5914
5915
5916
5917
5918
5919
5920
5921
5922
5923
5924
5925
5926
5927
5928
5929
5930
5931
5932
5933
5934
5935
5936
5937
5938
5939
5940
5941
5942
5943
5944
5945
5946
5947
5948
5949
5950
5951
5952
5953
5954
5955
5956
5957
5958
5959
5960
5961
5962
5963
5964
5965
5966
5967
5968
5969
5970
5971
5972
5973
5974
5975
5976
5977
5978
5979
5980
5981
5982
5983
5984
5985
5986
5987
5988
5989
5990
5991
5992
5993
5994
5995
5996
5997
5998
5999
6000
6001
6002
6003
6004
6005
6006
6007
6008
6009
6010
6011
6012
6013
6014
6015
6016
6017
6018
6019
6020
6021
6022
6023
6024
6025
6026
6027
6028
6029
6030
6031
6032
6033
6034
6035
6036
6037
6038
6039
6040
6041
6042
6043
6044
6045
6046
6047
6048
6049
6050
6051
6052
6053
6054
6055
6056
6057
6058
6059
6060
6061
6062
6063
6064
6065
6066
6067
6068
6069
6070
6071
6072
6073
6074
6075
6076
6077
6078
6079
6080
6081
6082
6083
6084
6085
6086
6087
6088
6089
6090
6091
6092
6093
6094
6095
6096
6097
6098
6099
6100
6101
6102
6103
6104
6105
6106
6107
6108
6109
6110
6111
6112
6113
6114
6115
6116
6117
6118
6119
6120
6121
6122
6123
6124
6125
6126
6127
6128
6129
6130
6131
6132
6133
6134
6135
6136
6137
6138
6139
6140
6141
6142
6143
6144
6145
6146
6147
6148
6149
6150
6151
6152
6153
6154
6155
6156
6157
6158
6159
6160
6161
6162
6163
6164
6165
6166
6167
6168
6169
6170
6171
6172
6173
6174
6175
6176
6177
6178
6179
6180
6181
6182
6183
6184
6185
6186
6187
6188
6189
6190
6191
6192
6193
6194
6195
6196
6197
6198
6199
6200
6201
6202
6203
6204
6205
6206
6207
6208
6209
6210
6211
6212
6213
6214
6215
6216
6217
6218
6219
6220
6221
6222
6223
6224
6225
6226
6227
6228
6229
6230
6231
6232
6233
6234
6235
6236
6237
6238
6239
6240
6241
6242
6243
6244
6245
6246
6247
6248
6249
6250
6251
6252
6253
6254
6255
6256
6257
6258
6259
6260
6261
6262
6263
6264
6265
6266
6267
6268
6269
6270
6271
6272
6273
6274
6275
6276
6277
6278
6279
6280
6281
6282
6283
6284
6285
6286
6287
6288
6289
6290
6291
6292
6293
6294
6295
6296
6297
6298
6299
6300
6301
6302
6303
6304
6305
6306
6307
6308
6309
6310
6311
6312
6313
6314
6315
6316
6317
6318
6319
6320
6321
6322
6323
6324
6325
6326
6327
6328
6329
6330
6331
6332
6333
6334
6335
6336
6337
6338
6339
6340
6341
6342
6343
6344
6345
6346
6347
6348
6349
6350
6351
6352
6353
6354
6355
6356
6357
6358
6359
6360
6361
6362
6363
6364
6365
6366
6367
6368
6369
6370
6371
6372
6373
6374
6375
6376
6377
6378
6379
6380
6381
6382
6383
6384
6385
6386
6387
6388
6389
6390
6391
6392
6393
6394
6395
6396
6397
6398
6399
6400
6401
6402
6403
6404
6405
6406
6407
6408
6409
6410
6411
6412
6413
6414
6415
6416
6417
6418
6419
6420
6421
6422
6423
6424
6425
6426
6427
6428
6429
6430
6431
6432
6433
6434
6435
6436
6437
6438
6439
6440
6441
6442
6443
6444
6445
6446
6447
6448
6449
6450
6451
6452
6453
6454
6455
6456
6457
6458
6459
6460
6461
6462
6463
6464
6465
6466
6467
6468
6469
6470
6471
6472
6473
6474
6475
6476
6477
6478
6479
6480
6481
6482
6483
6484
6485
6486
6487
6488
6489
6490
6491
6492
6493
6494
6495
6496
6497
6498
6499
6500
6501
6502
6503
6504
6505
6506
6507
6508
6509
6510
6511
6512
6513
6514
6515
6516
6517
6518
6519
6520
6521
6522
6523
6524
6525
6526
6527
6528
6529
6530
6531
6532
6533
6534
6535
6536
6537
6538
6539
6540
6541
6542
6543
6544
6545
6546
6547
6548
6549
6550
6551
6552
6553
6554
6555
6556
6557
6558
6559
6560
6561
6562
6563
6564
6565
6566
6567
6568
6569
6570
6571
6572
6573
6574
6575
6576
6577
6578
6579
6580
6581
6582
6583
6584
6585
6586
6587
6588
6589
6590
6591
6592
6593
6594
6595
6596
6597
6598
6599
6600
6601
6602
6603
6604
6605
6606
6607
6608
6609
6610
6611
6612
6613
6614
6615
6616
6617
6618
6619
6620
6621
6622
6623
6624
6625
6626
6627
6628
6629
6630
6631
6632
6633
6634
6635
6636
6637
6638
6639
6640
6641
6642
6643
6644
6645
6646
6647
6648
6649
6650
6651
6652
6653
6654
6655
6656
6657
6658
6659
6660
6661
6662
6663
6664
6665
6666
6667
6668
6669
6670
6671
6672
6673
6674
6675
6676
6677
6678
6679
6680
6681
6682
6683
6684
6685
6686
6687
6688
6689
6690
6691
6692
6693
6694
6695
6696
6697
6698
6699
6700
6701
6702
6703
6704
6705
6706
6707
6708
6709
6710
6711
6712
6713
6714
6715
6716
6717
6718
6719
6720
6721
6722
6723
6724
6725
6726
6727
6728
6729
6730
6731
6732
6733
6734
6735
6736
6737
6738
6739
6740
6741
6742
6743
6744
6745
6746
6747
6748
6749
6750
6751
6752
6753
6754
6755
6756
6757
6758
6759
6760
6761
6762
6763
6764
6765
6766
6767
6768
6769
6770
6771
6772
6773
6774
6775
6776
6777
6778
6779
6780
6781
6782
6783
6784
6785
6786
6787
6788
6789
6790
6791
6792
6793
6794
6795
6796
6797
6798
6799
6800
6801
6802
6803
6804
6805
6806
6807
6808
6809
6810
6811
6812
6813
6814
6815
6816
6817
6818
6819
6820
6821
6822
6823
6824
6825
6826
6827
6828
6829
6830
6831
6832
6833
6834
6835
6836
6837
6838
6839
6840
6841
6842
6843
6844
6845
6846
6847
6848
6849
6850
6851
6852
6853
6854
6855
6856
6857
6858
6859
6860
6861
6862
6863
6864
6865
6866
6867
6868
6869
6870
6871
6872
6873
6874
6875
6876
6877
6878
6879
6880
6881
6882
6883
6884
6885
6886
6887
6888
6889
6890
6891
6892
6893
6894
6895
6896
6897
6898
6899
6900
6901
6902
6903
6904
6905
6906
6907
6908
6909
6910
6911
6912
6913
6914
6915
6916
6917
6918
6919
6920
6921
6922
6923
6924
6925
6926
6927
6928
6929
6930
6931
6932
6933
6934
6935
6936
6937
6938
6939
6940
6941
6942
6943
6944
6945
6946
6947
6948
6949
6950
6951
6952
6953
6954
6955
6956
6957
6958
6959
6960
6961
6962
6963
6964
6965
6966
6967
6968
6969
6970
6971
6972
6973
6974
6975
6976
6977
6978
6979
6980
6981
6982
6983
6984
6985
6986
6987
6988
6989
6990
6991
6992
6993
6994
6995
6996
6997
6998
6999
7000
7001
7002
7003
7004
7005
7006
7007
7008
7009
7010
7011
7012
7013
7014
7015
7016
7017
7018
7019
7020
7021
7022
7023
7024
7025
7026
7027
7028
7029
7030
7031
7032
7033
7034
7035
7036
7037
7038
7039
7040
7041
7042
7043
7044
7045
7046
7047
7048
7049
7050
7051
7052
7053
7054
7055
7056
7057
7058
7059
7060
7061
7062
7063
7064
7065
7066
7067
7068
7069
7070
7071
7072
7073
7074
7075
7076
7077
7078
7079
7080
7081
7082
7083
7084
7085
7086
7087
7088
7089
7090
7091
7092
7093
7094
7095
7096
7097
7098
7099
7100
7101
7102
7103
7104
7105
7106
7107
7108
7109
7110
7111
7112
7113
7114
7115
7116
7117
7118
7119
7120
7121
7122
7123
7124
7125
7126
7127
7128
7129
7130
7131
7132
7133
7134
7135
7136
7137
7138
7139
7140
7141
7142
7143
7144
7145
7146
7147
7148
7149
7150
7151
7152
7153
7154
7155
7156
7157
7158
7159
7160
7161
7162
7163
7164
7165
7166
7167
7168
7169
7170
7171
7172
7173
7174
7175
7176
7177
7178
7179
7180
7181
7182
7183
7184
7185
7186
7187
7188
7189
7190
7191
7192
7193
7194
7195
7196
7197
7198
7199
7200
7201
7202
7203
7204
7205
7206
7207
7208
7209
7210
7211
7212
7213
7214
7215
7216
7217
7218
7219
7220
7221
7222
7223
7224
7225
7226
7227
7228
7229
7230
7231
7232
7233
7234
7235
7236
7237
7238
7239
7240
7241
7242
7243
7244
7245
7246
7247
7248
7249
7250
7251
7252
7253
7254
7255
7256
7257
7258
7259
7260
7261
7262
7263
7264
7265
7266
7267
7268
7269
7270
7271
7272
7273
7274
7275
7276
7277
7278
7279
7280
7281
7282
7283
7284
7285
7286
7287
7288
7289
7290
7291
7292
7293
7294
7295
7296
7297
7298
7299
7300
7301
7302
7303
7304
7305
7306
7307
7308
7309
7310
7311
7312
7313
7314
7315
7316
7317
7318
7319
7320
7321
7322
7323
7324
7325
7326
7327
7328
7329
7330
7331
7332
7333
7334
7335
7336
7337
7338
7339
7340
7341
7342
7343
7344
7345
7346
7347
7348
7349
7350
7351
7352
7353
7354
7355
7356
7357
7358
7359
7360
7361
7362
7363
7364
7365
7366
7367
7368
7369
7370
7371
7372
7373
7374
7375
7376
7377
7378
7379
7380
7381
7382
7383
7384
7385
7386
7387
7388
7389
7390
7391
7392
7393
7394
7395
7396
7397
7398
7399
7400
7401
7402
7403
7404
7405
7406
7407
7408
7409
7410
7411
7412
7413
7414
7415
7416
7417
7418
7419
7420
7421
7422
7423
7424
7425
7426
7427
7428
7429
7430
7431
7432
7433
7434
7435
7436
7437
7438
7439
7440
7441
7442
7443
7444
7445
7446
7447
7448
7449
7450
7451
7452
7453
7454
7455
7456
7457
7458
7459
7460
7461
7462
7463
7464
7465
7466
7467
7468
7469
7470
7471
7472
7473
7474
7475
7476
7477
7478
7479
7480
7481
7482
7483
7484
7485
7486
7487
7488
7489
7490
7491
7492
7493
7494
7495
7496
7497
7498
7499
7500
7501
7502
7503
7504
7505
7506
7507
7508
7509
7510
7511
7512
7513
7514
7515
7516
7517
7518
7519
7520
7521
7522
7523
7524
7525
7526
7527
7528
7529
7530
7531
7532
7533
7534
7535
7536
7537
7538
7539
7540
7541
7542
7543
7544
7545
7546
7547
7548
7549
7550
7551
7552
7553
7554
7555
7556
7557
7558
7559
7560
7561
7562
7563
7564
7565
7566
7567
7568
7569
7570
7571
7572
7573
7574
7575
7576
7577
7578
7579
7580
7581
7582
7583
7584
7585
7586
7587
7588
7589
7590
7591
7592
7593
7594
7595
7596
7597
7598
7599
7600
7601
7602
7603
7604
7605
7606
7607
7608
7609
7610
7611
7612
7613
7614
7615
7616
7617
7618
7619
7620
7621
7622
7623
7624
7625
7626
7627
7628
7629
7630
7631
7632
7633
7634
7635
7636
7637
7638
7639
7640
7641
7642
7643
7644
7645
7646
7647
7648
7649
7650
7651
7652
7653
7654
7655
7656
7657
7658
7659
7660
7661
7662
7663
7664
7665
7666
7667
7668
7669
7670
7671
7672
7673
7674
7675
7676
7677
7678
7679
7680
7681
7682
7683
7684
7685
7686
7687
7688
7689
7690
7691
7692
7693
7694
7695
7696
7697
7698
7699
7700
7701
7702
7703
7704
7705
7706
7707
7708
7709
7710
7711
7712
7713
7714
7715
7716
7717
7718
7719
7720
7721
7722
7723
7724
7725
7726
7727
7728
7729
7730
7731
7732
7733
7734
7735
7736
7737
7738
7739
7740
7741
7742
7743
7744
7745
7746
7747
7748
7749
7750
7751
7752
7753
7754
7755
7756
7757
7758
7759
7760
7761
7762
7763
7764
7765
7766
7767
7768
7769
7770
7771
7772
7773
7774
7775
7776
7777
7778
7779
7780
7781
7782
7783
7784
7785
7786
7787
7788
7789
7790
7791
7792
7793
7794
7795
7796
7797
7798
7799
7800
7801
7802
7803
7804
7805
7806
7807
7808
7809
7810
7811
7812
7813
7814
7815
7816
7817
7818
7819
7820
7821
7822
7823
7824
7825
7826
7827
7828
7829
7830
7831
7832
7833
7834
7835
7836
7837
7838
7839
7840
7841
7842
7843
7844
7845
7846
7847
7848
7849
7850
7851
7852
7853
7854
7855
7856
7857
7858
7859
7860
7861
7862
7863
7864
7865
7866
7867
7868
7869
7870
7871
7872
7873
7874
7875
7876
7877
7878
7879
7880
7881
7882
7883
7884
7885
7886
7887
7888
7889
7890
7891
7892
7893
7894
7895
7896
7897
7898
7899
7900
7901
7902
7903
7904
7905
7906
7907
7908
7909
7910
7911
7912
7913
7914
7915
7916
7917
7918
7919
7920
7921
7922
7923
7924
7925
7926
7927
7928
7929
7930
7931
7932
7933
7934
7935
7936
7937
7938
7939
7940
7941
7942
7943
7944
7945
7946
7947
7948
7949
7950
7951
7952
7953
7954
7955
7956
7957
7958
7959
7960
7961
7962
7963
7964
7965
7966
7967
7968
7969
7970
7971
7972
7973
7974
7975
7976
7977
7978
7979
7980
7981
7982
7983
7984
7985
7986
7987
7988
7989
7990
7991
7992
7993
7994
7995
7996
7997
7998
7999
8000
8001
8002
8003
8004
8005
8006
8007
8008
8009
8010
8011
8012
8013
8014
8015
8016
8017
8018
8019
8020
8021
8022
8023
8024
8025
8026
8027
8028
8029
8030
8031
8032
8033
8034
8035
8036
8037
8038
8039
8040
8041
8042
8043
8044
8045
8046
8047
8048
8049
8050
8051
8052
8053
8054
8055
8056
8057
8058
8059
8060
8061
8062
8063
8064
8065
8066
8067
8068
8069
8070
8071
8072
8073
8074
8075
8076
8077
8078
8079
8080
8081
8082
8083
8084
8085
8086
8087
8088
8089
8090
8091
8092
8093
8094
8095
8096
8097
8098
8099
8100
8101
8102
8103
8104
8105
8106
8107
8108
8109
8110
8111
8112
8113
8114
8115
8116
8117
8118
8119
8120
8121
8122
8123
8124
8125
8126
8127
8128
8129
8130
8131
8132
8133
8134
8135
8136
8137
8138
8139
8140
8141
8142
8143
8144
8145
8146
8147
8148
8149
8150
8151
8152
8153
8154
8155
8156
8157
8158
8159
8160
8161
8162
8163
8164
8165
8166
8167
8168
8169
8170
8171
8172
8173
8174
8175
8176
8177
8178
8179
8180
8181
8182
8183
8184
8185
8186
8187
8188
8189
8190
8191
8192
8193
8194
8195
8196
8197
8198
8199
8200
8201
8202
8203
8204
8205
8206
8207
8208
8209
8210
8211
8212
8213
8214
8215
8216
8217
8218
8219
8220
8221
8222
8223
8224
8225
8226
8227
8228
8229
8230
8231
8232
8233
8234
8235
8236
8237
8238
8239
8240
8241
8242
8243
8244
8245
8246
8247
8248
8249
8250
8251
8252
8253
8254
8255
8256
8257
8258
8259
8260
8261
8262
8263
8264
8265
8266
8267
8268
8269
8270
8271
8272
8273
8274
8275
8276
8277
8278
8279
8280
8281
8282
8283
8284
8285
8286
8287
8288
8289
8290
8291
8292
8293
8294
8295
8296
8297
8298
8299
8300
8301
8302
8303
8304
8305
8306
8307
8308
8309
8310
8311
8312
8313
8314
8315
8316
8317
8318
8319
8320
8321
8322
8323
8324
8325
8326
8327
8328
8329
8330
8331
8332
8333
8334
8335
8336
8337
8338
8339
8340
8341
8342
8343
8344
8345
8346
8347
8348
8349
8350
8351
8352
8353
8354
8355
8356
8357
8358
8359
8360
8361
8362
8363
8364
8365
8366
8367
8368
8369
8370
8371
8372
8373
8374
8375
8376
8377
8378
8379
8380
8381
8382
8383
8384
8385
8386
8387
8388
8389
8390
8391
8392
8393
8394
8395
8396
8397
8398
8399
8400
8401
8402
8403
8404
8405
8406
8407
8408
8409
8410
8411
8412
8413
8414
8415
8416
8417
8418
8419
8420
8421
8422
8423
8424
8425
8426
8427
8428
8429
8430
8431
8432
8433
8434
8435
8436
8437
8438
8439
8440
8441
8442
8443
8444
8445
8446
8447
8448
8449
8450
8451
8452
8453
8454
8455
8456
8457
8458
8459
8460
8461
8462
8463
8464
8465
8466
8467
8468
8469
8470
8471
8472
8473
8474
8475
8476
8477
8478
8479
8480
8481
8482
8483
8484
8485
8486
8487
8488
8489
8490
8491
8492
8493
8494
8495
8496
8497
8498
8499
8500
8501
8502
8503
8504
8505
8506
8507
8508
8509
8510
8511
8512
8513
8514
8515
8516
8517
8518
8519
8520
8521
8522
8523
8524
8525
8526
8527
8528
8529
8530
8531
8532
8533
8534
8535
8536
8537
8538
8539
8540
8541
8542
8543
8544
8545
8546
8547
8548
8549
8550
8551
8552
8553
8554
8555
8556
8557
8558
8559
8560
8561
8562
8563
8564
8565
8566
8567
8568
8569
8570
8571
8572
8573
8574
8575
8576
8577
8578
8579
8580
8581
8582
8583
8584
8585
8586
8587
8588
8589
8590
8591
8592
8593
8594
8595
8596
8597
8598
8599
8600
8601
8602
8603
8604
8605
8606
8607
8608
8609
8610
8611
8612
8613
8614
8615
8616
8617
8618
8619
8620
8621
8622
8623
8624
8625
8626
8627
8628
8629
8630
8631
8632
8633
8634
8635
8636
8637
8638
8639
8640
8641
8642
8643
8644
8645
8646
8647
8648
8649
8650
8651
8652
8653
8654
8655
8656
8657
8658
8659
8660
8661
8662
8663
8664
8665
8666
8667
8668
8669
8670
8671
8672
8673
8674
8675
8676
8677
8678
8679
8680
8681
8682
8683
8684
8685
8686
8687
8688
8689
8690
8691
8692
8693
8694
8695
8696
8697
8698
8699
8700
8701
8702
8703
8704
8705
8706
8707
8708
8709
8710
8711
8712
8713
8714
8715
8716
8717
8718
8719
8720
8721
8722
8723
8724
8725
8726
8727
8728
8729
8730
8731
8732
8733
8734
8735
8736
8737
8738
8739
8740
8741
8742
# this file has been generated automatically; do not edit

import _lasso
import sys


def cptrToPy(cptr):
    if cptr is None:
        return None
    klass = getattr(lasso, cptr.typename)
    o = klass.__new__(klass)
    o._cptr = cptr
    return o

if sys.version_info >= (3,):
    def str2lasso(s):
        return s
else: # Python 2.x
    def str2lasso(s):
        if isinstance(s, unicode):
            return s.encode('utf-8')
        return s

class frozendict(dict):
    '''Immutable dict'''
    # from Python Cookbook:
    #   http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/414283
    def _blocked_attribute(obj):
        raise AttributeError('A frozendict cannot be modified.')
    _blocked_attribute = property(_blocked_attribute)

    __delitem__ = __setitem__ = clear = _blocked_attribute
    pop = popitem = setdefault = update = _blocked_attribute

    def __new__(cls, *args):
        new = dict.__new__(cls)
        dict.__init__(new, *args)
        return new

    def __init__(self, *args):
        pass

    def __hash__(self):
        try:
            return self._cached_hash
        except AttributeError:
            h = self._cached_hash = hash(tuple(sorted(self.items())))
            return h

    def __repr__(self):
        return 'frozendict(%s)' % dict.__repr__(self)

class Error(Exception):
    code = None

    @staticmethod
    def raise_on_rc(rc):
        global exceptions_dict
        if rc != 0:
            exception = exceptions_dict.get(rc, Error())
            exception.code = rc
            raise exception

    def __str__(self):
        if self.code:
            return '<lasso.%s(%s): %s>' % (self.__class__.__name__, self.code, _lasso.strError(self.code))
        else:
            return '<lasso.%s: %s>' % (self.__class__.__name__, self.message)

    def __getitem__(self, i):
        # compatibility with SWIG bindings
        if i == 0:
            return self.code
        elif i == 1:
            return _lasso.strError(self.code)
        else:
            raise IndexError()

class ProfileError(Error):
    pass

class ProviderError(Error):
    pass

class ServerError(ProviderError):
    pass

class LoginError(ProfileError):
    pass

class LogoutError(ProfileError):
    pass

class DefederationError(ProfileError):
    pass

class NameIdentifierMappingError(ProfileError):
    pass

class WsfProfileError(ProfileError):
    pass

class DiscoveryError(WsfProfileError):
    pass

class DataServiceError(WsfProfileError):
    pass

class DstError(WsfProfileError):
    pass

class XmlError(Error):
    pass

class XmlNodeNotFoundError(XmlError):
    pass

class XmlNodeContentNotFoundError(XmlError):
    pass

class XmlAttrNotFoundError(XmlError):
    pass

class XmlAttrValueNotFoundError(XmlError):
    pass

class XmlInvalidFileError(XmlError):
    pass

class XmlObjectConstructionFailedError(XmlError):
    pass

class XmlMissingNamespaceError(XmlError):
    pass

class XmlSchemaInvalidFragmentError(XmlError):
    pass

class XmlAttrValueInvalidError(XmlError):
    pass

class DsError(Error):
    pass

class DsSignatureNotFoundError(DsError):
    pass

class DsInvalidSignatureError(DsError):
    pass

class DsSignatureTmplCreationFailedError(DsError):
    pass

class DsContextCreationFailedError(DsError):
    pass

class DsPublicKeyLoadFailedError(DsError):
    pass

class DsPrivateKeyLoadFailedError(DsError):
    pass

class DsCertificateLoadFailedError(DsError):
    pass

class DsSignatureFailedError(DsError):
    pass

class DsKeysMngrCreationFailedError(DsError):
    pass

class DsKeysMngrInitFailedError(DsError):
    pass

class DsSignatureVerificationFailedError(DsError):
    pass

class DsCaCertChainLoadFailedError(DsError):
    pass

class DsInvalidSigalgError(DsError):
    pass

class DsDigestComputeFailedError(DsError):
    pass

class DsSignatureTemplateNotFoundError(DsError):
    pass

class DsTooMuchReferencesError(DsError):
    pass

class DsInvalidReferenceForSamlError(DsError):
    pass

class DsDecryptionFailedError(DsError):
    pass

class DsEncryptionFailedError(DsError):
    pass

class DsDecryptionFailedMissingPrivateKeyError(DsError):
    pass

class ServerProviderNotFoundError(ServerError):
    pass

class ServerAddProviderFailedError(ServerError):
    pass

class ServerAddProviderProtocolMismatchError(ServerError):
    pass

class ServerSetEncryptionPrivateKeyFailedError(ServerError):
    pass

class ServerInvalidXmlError(ServerError):
    pass

class ServerNoProviderLoadedError(ServerError):
    pass

class LogoutUnsupportedProfileError(LogoutError):
    pass

class LogoutRequestDeniedError(LogoutError):
    pass

class LogoutFederationNotFoundError(LogoutError):
    pass

class LogoutUnknownPrincipalError(LogoutError):
    pass

class LogoutPartialLogoutError(LogoutError):
    pass

class ProfileInvalidQueryError(ProfileError):
    pass

class ProfileInvalidPostMsgError(ProfileError):
    pass

class ProfileInvalidSoapMsgError(ProfileError):
    pass

class ProfileMissingRequestError(ProfileError):
    pass

class ProfileInvalidHttpMethodError(ProfileError):
    pass

class ProfileInvalidProtocolprofileError(ProfileError):
    pass

class ProfileInvalidMsgError(ProfileError):
    pass

class ProfileMissingRemoteProvideridError(ProfileError):
    pass

class ProfileUnsupportedProfileError(ProfileError):
    pass

class ProfileUnknownProfileUrlError(ProfileError):
    pass

class ProfileIdentityNotFoundError(ProfileError):
    pass

class ProfileFederationNotFoundError(ProfileError):
    pass

class ProfileNameIdentifierNotFoundError(ProfileError):
    pass

class ProfileBuildingQueryFailedError(ProfileError):
    pass

class ProfileBuildingRequestFailedError(ProfileError):
    pass

class ProfileBuildingMessageFailedError(ProfileError):
    pass

class ProfileBuildingResponseFailedError(ProfileError):
    pass

class ProfileSessionNotFoundError(ProfileError):
    pass

class ProfileBadIdentityDumpError(ProfileError):
    pass

class ProfileBadSessionDumpError(ProfileError):
    pass

class ProfileMissingResponseError(ProfileError):
    pass

class ProfileMissingStatusCodeError(ProfileError):
    pass

class ProfileMissingArtifactError(ProfileError):
    pass

class ProfileMissingResourceOfferingError(ProfileError):
    pass

class ProfileMissingServiceDescriptionError(ProfileError):
    pass

class ProfileMissingServiceTypeError(ProfileError):
    pass

class ProfileMissingAssertionError(ProfileError):
    pass

class ProfileMissingSubjectError(ProfileError):
    pass

class ProfileMissingNameIdentifierError(ProfileError):
    pass

class ProfileInvalidArtifactError(ProfileError):
    pass

class ProfileMissingEncryptionPrivateKeyError(ProfileError):
    pass

class ProfileStatusNotSuccessError(ProfileError):
    pass

class ProfileMissingIssuerError(ProfileError):
    pass

class ProfileMissingServiceInstanceError(ProfileError):
    pass

class ProfileMissingEndpointReferenceError(ProfileError):
    pass

class ProfileMissingEndpointReferenceAddressError(ProfileError):
    pass

class ProfileInvalidIssuerError(ProfileError):
    pass

class ProfileMissingServerError(ProfileError):
    pass

class ProfileUnknownProviderError(ProfileError):
    pass

class ProfileCannotVerifySignatureError(ProfileError):
    pass

class ProfileCannotFindAProviderError(ProfileError):
    pass

class ProfileResponseDoesNotMatchRequestError(ProfileError):
    pass

class ProfileInvalidRequestError(ProfileError):
    pass

class ProfileInvalidResponseError(ProfileError):
    pass

class ProfileUnsupportedBindingError(ProfileError):
    pass

class ProfileInvalidAssertionConditionsError(ProfileError):
    pass

class ProfileInvalidAssertionError(ProfileError):
    pass

class ProfileUnknownIssuerError(ProfileError):
    pass

class ProfileIssuerIsNotAnIdpError(ProfileError):
    pass

class ProfileRequestDeniedError(ProfileError):
    pass

class ProfileEndpointIndexNotFoundError(ProfileError):
    pass

class ProfileInvalidIdpListError(ProfileError):
    pass

class ParamError(Error):
    pass

class ParamBadTypeOrNullObjError(ParamError):
    pass

class ParamInvalidValueError(ParamError):
    pass

class ParamCheckFailedError(ParamError):
    pass

class ParamNonInitializedObjectError(ParamError):
    pass

class LoginFederationNotFoundError(LoginError):
    pass

class LoginConsentNotObtainedError(LoginError):
    pass

class LoginInvalidNameidpolicyError(LoginError):
    pass

class LoginRequestDeniedError(LoginError):
    pass

class LoginInvalidSignatureError(LoginError):
    pass

class LoginUnsignedAuthnRequestError(LoginError):
    pass

class LoginStatusNotSuccessError(LoginError):
    pass

class LoginUnknownPrincipalError(LoginError):
    pass

class LoginNoDefaultEndpointError(LoginError):
    pass

class LoginAssertionReplayError(LoginError):
    pass

class LoginAssertionDoesNotMatchRequestIdError(LoginError):
    pass

class LoginInvalidAssertionSignatureError(LoginError):
    pass

class DefederationMissingNameIdentifierError(DefederationError):
    pass

class SoapError(Error):
    pass

class SoapRedirectRequestFaultError(SoapError):
    pass

class SoapMissingEnvelopeError(SoapError):
    pass

class SoapMissingHeaderError(SoapError):
    pass

class SoapMissingBodyError(SoapError):
    pass

class SoapMissingSoapFaultDetailError(SoapError):
    pass

class NameidentifiermappingMissingTargetNamespaceError(NameIdentifierMappingError):
    pass

class NameidentifiermappingForbiddenCallOnThisSideError(NameIdentifierMappingError):
    pass

class NameidentifiermappingMissingTargetIdentifierError(NameIdentifierMappingError):
    pass

class DataserviceUnregisteredDstError(DataServiceError):
    pass

class DataserviceCannotAddItemError(DataServiceError):
    pass

class WsfprofileMissingCorrelationError(WsfProfileError):
    pass

class WsfprofileMissingSecurityError(WsfProfileError):
    pass

class WsfprofileMissingAssertionIdError(WsfProfileError):
    pass

class WsfprofileMissingEndpointError(WsfProfileError):
    pass

class WsfprofileSoapFaultError(WsfProfileError):
    pass

class WsfprofileUnsupportedSecurityMechanismError(WsfProfileError):
    pass

class WsfprofileMissingDescriptionError(WsfProfileError):
    pass

class WsfprofileMissingResourceIdError(WsfProfileError):
    pass

class WsfprofileMissingCredentialRefError(WsfProfileError):
    pass

class WsfprofileInvalidOrMissingReferenceToMessageIdError(WsfProfileError):
    pass

class WsfprofileSecurityMechanismCheckFailedError(WsfProfileError):
    pass

class WsfprofileUnknownStatusCodeError(WsfProfileError):
    pass

class WsfprofileServerInteractionRequiredError(WsfProfileError):
    pass

class WsfprofileServerInteractionRequiredForDataError(WsfProfileError):
    pass

class WsfprofileRedirectRequestError(WsfProfileError):
    pass

class WsfprofileRedirectRequestUnsupportedByRequesterError(WsfProfileError):
    pass

class WsfprofileMissingSenderIdError(WsfProfileError):
    pass

class DiscoverySvcMetadataRegisterFailedError(DiscoveryError):
    pass

class DiscoverySvcMetadataAssociationAddFailedError(DiscoveryError):
    pass

class DiscoveryMissingRequestedServiceError(DiscoveryError):
    pass

class DiscoveryFailedToBuildEndpointReferenceError(DiscoveryError):
    pass

class DstMissingServiceDataError(DstError):
    pass

class DstQueryFailedError(DstError):
    pass

class DstQueryPartiallyFailedError(DstError):
    pass

class DstModifyFailedError(DstError):
    pass

class DstModifyPartiallyFailedError(DstError):
    pass

class DstNewDataMissingError(DstError):
    pass

class DstQueryNotFoundError(DstError):
    pass

class DstNoDataError(DstError):
    pass

class DstMalformedQueryError(DstError):
    pass

class DstEmptyRequestError(DstError):
    pass

class RegistryError(Error):
    pass

class RegistryKeyExistsError(RegistryError):
    pass

class ProviderMissingPublicKeyError(ProviderError):
    pass

class WssecError(Error):
    pass

class WssecMissingSecurityTokenError(WssecError):
    pass

class WssecBadPasswordError(WssecError):
    pass

class Idwsf2DiscoveryError(Error):
    pass

class Idwsf2DiscoveryFailedError(Idwsf2DiscoveryError):
    pass

class Idwsf2DiscoveryForbiddenError(Idwsf2DiscoveryError):
    pass

class Idwsf2DiscoveryDuplicateError(Idwsf2DiscoveryError):
    pass

class Idwsf2DiscoveryLogicalDuplicateError(Idwsf2DiscoveryError):
    pass

class Idwsf2DiscoveryNoResultsError(Idwsf2DiscoveryError):
    pass

class Idwsf2DiscoveryNotFoundError(Idwsf2DiscoveryError):
    pass

class Idwsf2DstError(Error):
    pass

class Idwsf2DstDuplicateItemError(Idwsf2DstError):
    pass

class Idwsf2DstPartialFailureError(Idwsf2DstError):
    pass

class Idwsf2DstUnknownStatusCodeError(Idwsf2DstError):
    pass

class Idwsf2DstItemNotFoundError(Idwsf2DstError):
    pass

class AssertionQueryError(Error):
    pass

class AssertionqueryAttributeRequestAlreadyExistError(AssertionQueryError):
    pass

class AssertionqueryNotAnAttributeQueryError(AssertionQueryError):
    pass

class XmlencError(Error):
    pass

class XmlencInvalidEncryptedDataError(XmlencError):
    pass

class PaosError(Error):
    pass

class PaosMissingRequestError(PaosError):
    pass

class PaosMissingResponseError(PaosError):
    pass

class PaosMissingResponseConsumerUrlError(PaosError):
    pass

class EcpError(Error):
    pass

class EcpMissingRequestError(EcpError):
    pass

class EcpMissingResponseError(EcpError):
    pass

class EcpMissingRelaystateError(EcpError):
    pass

class EcpMissingAuthnRequestError(EcpError):
    pass

class EcpMissingSamlResponseError(EcpError):
    pass

class EcpAssertionConsumerUrlMismatchError(EcpError):
    pass

exceptions_dict = {
    _lasso.WSF_PROFILE_ERROR_UNKNOWN_STATUS_CODE: WsfprofileUnknownStatusCodeError,
    _lasso.PROFILE_ERROR_SESSION_NOT_FOUND: ProfileSessionNotFoundError,
    _lasso.WSF_PROFILE_ERROR_MISSING_ENDPOINT: WsfprofileMissingEndpointError,
    _lasso.LOGIN_ERROR_ASSERTION_REPLAY: LoginAssertionReplayError,
    _lasso.ECP_ERROR_MISSING_REQUEST: EcpMissingRequestError,
    _lasso.DISCOVERY_ERROR_SVC_METADATA_REGISTER_FAILED: DiscoverySvcMetadataRegisterFailedError,
    _lasso.DS_ERROR_DIGEST_COMPUTE_FAILED: DsDigestComputeFailedError,
    _lasso.ECP_ERROR_MISSING_RELAYSTATE: EcpMissingRelaystateError,
    _lasso.LOGIN_ERROR_ASSERTION_DOES_NOT_MATCH_REQUEST_ID: LoginAssertionDoesNotMatchRequestIdError,
    _lasso.NAME_IDENTIFIER_MAPPING_ERROR_MISSING_TARGET_NAMESPACE: NameidentifiermappingMissingTargetNamespaceError,
    _lasso.DS_ERROR_SIGNATURE_NOT_FOUND: DsSignatureNotFoundError,
    _lasso.LOGIN_ERROR_FEDERATION_NOT_FOUND: LoginFederationNotFoundError,
    _lasso.PROFILE_ERROR_INVALID_RESPONSE: ProfileInvalidResponseError,
    _lasso.DS_ERROR_DECRYPTION_FAILED: DsDecryptionFailedError,
    _lasso.ECP_ERROR_MISSING_RESPONSE: EcpMissingResponseError,
    _lasso.DS_ERROR_SIGNATURE_FAILED: DsSignatureFailedError,
    _lasso.PROFILE_ERROR_MISSING_SERVER: ProfileMissingServerError,
    _lasso.DS_ERROR_CERTIFICATE_LOAD_FAILED: DsCertificateLoadFailedError,
    _lasso.WSF_PROFILE_ERROR_MISSING_SENDER_ID: WsfprofileMissingSenderIdError,
    _lasso.WSF_PROFILE_ERROR_INVALID_OR_MISSING_REFERENCE_TO_MESSAGE_ID: WsfprofileInvalidOrMissingReferenceToMessageIdError,
    _lasso.DST_ERROR_MODIFY_FAILED: DstModifyFailedError,
    _lasso.DS_ERROR_INVALID_SIGALG: DsInvalidSigalgError,
    _lasso.IDWSF2_DISCOVERY_ERROR_FORBIDDEN: Idwsf2DiscoveryForbiddenError,
    _lasso.DS_ERROR_KEYS_MNGR_INIT_FAILED: DsKeysMngrInitFailedError,
    _lasso.DST_ERROR_MISSING_SERVICE_DATA: DstMissingServiceDataError,
    _lasso.LOGOUT_ERROR_UNSUPPORTED_PROFILE: LogoutUnsupportedProfileError,
    _lasso.IDWSF2_DISCOVERY_ERROR_DUPLICATE: Idwsf2DiscoveryDuplicateError,
    _lasso.DS_ERROR_TOO_MUCH_REFERENCES: DsTooMuchReferencesError,
    _lasso.PROFILE_ERROR_BUILDING_QUERY_FAILED: ProfileBuildingQueryFailedError,
    _lasso.DST_ERROR_QUERY_PARTIALLY_FAILED: DstQueryPartiallyFailedError,
    _lasso.LOGOUT_ERROR_UNKNOWN_PRINCIPAL: LogoutUnknownPrincipalError,
    _lasso.PROFILE_ERROR_INVALID_PROTOCOLPROFILE: ProfileInvalidProtocolprofileError,
    _lasso.SOAP_ERROR_REDIRECT_REQUEST_FAULT: SoapRedirectRequestFaultError,
    _lasso.DS_ERROR_SIGNATURE_TEMPLATE_NOT_FOUND: DsSignatureTemplateNotFoundError,
    _lasso.PROFILE_ERROR_ISSUER_IS_NOT_AN_IDP: ProfileIssuerIsNotAnIdpError,
    _lasso.LOGIN_ERROR_INVALID_NAMEIDPOLICY: LoginInvalidNameidpolicyError,
    _lasso.DS_ERROR_ENCRYPTION_FAILED: DsEncryptionFailedError,
    _lasso.DS_ERROR_INVALID_SIGNATURE: DsInvalidSignatureError,
    _lasso.PROFILE_ERROR_STATUS_NOT_SUCCESS: ProfileStatusNotSuccessError,
    _lasso.IDWSF2_DISCOVERY_ERROR_FAILED: Idwsf2DiscoveryFailedError,
    _lasso.LOGIN_ERROR_STATUS_NOT_SUCCESS: LoginStatusNotSuccessError,
    _lasso.PROFILE_ERROR_RESPONSE_DOES_NOT_MATCH_REQUEST: ProfileResponseDoesNotMatchRequestError,
    _lasso.ECP_ERROR_MISSING_AUTHN_REQUEST: EcpMissingAuthnRequestError,
    _lasso.PROFILE_ERROR_FEDERATION_NOT_FOUND: ProfileFederationNotFoundError,
    _lasso.SERVER_ERROR_PROVIDER_NOT_FOUND: ServerProviderNotFoundError,
    _lasso.DST_ERROR_MODIFY_PARTIALLY_FAILED: DstModifyPartiallyFailedError,
    _lasso.SOAP_ERROR_MISSING_SOAP_FAULT_DETAIL: SoapMissingSoapFaultDetailError,
    _lasso.WSSEC_ERROR_MISSING_SECURITY_TOKEN: WssecMissingSecurityTokenError,
    _lasso.XML_ERROR_ATTR_NOT_FOUND: XmlAttrNotFoundError,
    _lasso.PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ: ParamBadTypeOrNullObjError,
    _lasso.WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED: WsfprofileServerInteractionRequiredError,
    _lasso.WSF_PROFILE_ERROR_MISSING_CREDENTIAL_REF: WsfprofileMissingCredentialRefError,
    _lasso.DS_ERROR_INVALID_REFERENCE_FOR_SAML: DsInvalidReferenceForSamlError,
    _lasso.XML_ERROR_SCHEMA_INVALID_FRAGMENT: XmlSchemaInvalidFragmentError,
    _lasso.DST_ERROR_NO_DATA: DstNoDataError,
    _lasso.DS_ERROR_KEYS_MNGR_CREATION_FAILED: DsKeysMngrCreationFailedError,
    _lasso.DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED: DsCaCertChainLoadFailedError,
    _lasso.WSF_PROFILE_ERROR_SOAP_FAULT: WsfprofileSoapFaultError,
    _lasso.PROFILE_ERROR_BUILDING_REQUEST_FAILED: ProfileBuildingRequestFailedError,
    _lasso.PROFILE_ERROR_MISSING_SERVICE_TYPE: ProfileMissingServiceTypeError,
    _lasso.XMLENC_ERROR_INVALID_ENCRYPTED_DATA: XmlencInvalidEncryptedDataError,
    _lasso.XML_ERROR_ATTR_VALUE_INVALID: XmlAttrValueInvalidError,
    _lasso.DST_ERROR_NEW_DATA_MISSING: DstNewDataMissingError,
    _lasso.DS_ERROR_PRIVATE_KEY_LOAD_FAILED: DsPrivateKeyLoadFailedError,
    _lasso.IDWSF2_DISCOVERY_ERROR_LOGICAL_DUPLICATE: Idwsf2DiscoveryLogicalDuplicateError,
    _lasso.WSF_PROFILE_ERROR_MISSING_RESOURCE_ID: WsfprofileMissingResourceIdError,
    _lasso.PROFILE_ERROR_INVALID_IDP_LIST: ProfileInvalidIdpListError,
    _lasso.WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED_FOR_DATA: WsfprofileServerInteractionRequiredForDataError,
    _lasso.NAME_IDENTIFIER_MAPPING_ERROR_FORBIDDEN_CALL_ON_THIS_SIDE: NameidentifiermappingForbiddenCallOnThisSideError,
    _lasso.XML_ERROR_ATTR_VALUE_NOT_FOUND: XmlAttrValueNotFoundError,
    _lasso.PROFILE_ERROR_INVALID_SOAP_MSG: ProfileInvalidSoapMsgError,
    _lasso.PROFILE_ERROR_MISSING_SUBJECT: ProfileMissingSubjectError,
    _lasso.REGISTRY_ERROR_KEY_EXISTS: RegistryKeyExistsError,
    _lasso.XML_ERROR_NODE_NOT_FOUND: XmlNodeNotFoundError,
    _lasso.WSF_PROFILE_ERROR_MISSING_DESCRIPTION: WsfprofileMissingDescriptionError,
    _lasso.PROFILE_ERROR_INVALID_REQUEST: ProfileInvalidRequestError,
    _lasso.PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND: ProfileNameIdentifierNotFoundError,
    _lasso.PROFILE_ERROR_CANNOT_VERIFY_SIGNATURE: ProfileCannotVerifySignatureError,
    _lasso.ECP_ERROR_ASSERTION_CONSUMER_URL_MISMATCH: EcpAssertionConsumerUrlMismatchError,
    _lasso.WSF_PROFILE_ERROR_MISSING_SECURITY: WsfprofileMissingSecurityError,
    _lasso.LOGOUT_ERROR_FEDERATION_NOT_FOUND: LogoutFederationNotFoundError,
    _lasso.XML_ERROR_OBJECT_CONSTRUCTION_FAILED: XmlObjectConstructionFailedError,
    _lasso.PROFILE_ERROR_MISSING_ENDPOINT_REFERENCE: ProfileMissingEndpointReferenceError,
    _lasso.NAME_IDENTIFIER_MAPPING_ERROR_MISSING_TARGET_IDENTIFIER: NameidentifiermappingMissingTargetIdentifierError,
    _lasso.PROFILE_ERROR_INVALID_ISSUER: ProfileInvalidIssuerError,
    _lasso.PROFILE_ERROR_INVALID_POST_MSG: ProfileInvalidPostMsgError,
    _lasso.PROFILE_ERROR_UNSUPPORTED_BINDING: ProfileUnsupportedBindingError,
    _lasso.IDWSF2_DST_ERROR_UNKNOWN_STATUS_CODE: Idwsf2DstUnknownStatusCodeError,
    _lasso.DST_ERROR_EMPTY_REQUEST: DstEmptyRequestError,
    _lasso.PAOS_ERROR_MISSING_REQUEST: PaosMissingRequestError,
    _lasso.PROFILE_ERROR_BUILDING_MESSAGE_FAILED: ProfileBuildingMessageFailedError,
    _lasso.XML_ERROR_INVALID_FILE: XmlInvalidFileError,
    _lasso.PROFILE_ERROR_MISSING_RESOURCE_OFFERING: ProfileMissingResourceOfferingError,
    _lasso.PROFILE_ERROR_UNKNOWN_PROVIDER: ProfileUnknownProviderError,
    _lasso.LOGOUT_ERROR_PARTIAL_LOGOUT: LogoutPartialLogoutError,
    _lasso.PARAM_ERROR_CHECK_FAILED: ParamCheckFailedError,
    _lasso.WSF_PROFILE_ERROR_MISSING_ASSERTION_ID: WsfprofileMissingAssertionIdError,
    _lasso.LOGIN_ERROR_REQUEST_DENIED: LoginRequestDeniedError,
    _lasso.PROFILE_ERROR_MISSING_ENCRYPTION_PRIVATE_KEY: ProfileMissingEncryptionPrivateKeyError,
    _lasso.WSF_PROFILE_ERROR_UNSUPPORTED_SECURITY_MECHANISM: WsfprofileUnsupportedSecurityMechanismError,
    _lasso.PROFILE_ERROR_REQUEST_DENIED: ProfileRequestDeniedError,
    _lasso.PROFILE_ERROR_INVALID_ASSERTION_CONDITIONS: ProfileInvalidAssertionConditionsError,
    _lasso.PROFILE_ERROR_MISSING_NAME_IDENTIFIER: ProfileMissingNameIdentifierError,
    _lasso.WSF_PROFILE_ERROR_REDIRECT_REQUEST_UNSUPPORTED_BY_REQUESTER: WsfprofileRedirectRequestUnsupportedByRequesterError,
    _lasso.WSSEC_ERROR_BAD_PASSWORD: WssecBadPasswordError,
    _lasso.LOGIN_ERROR_UNKNOWN_PRINCIPAL: LoginUnknownPrincipalError,
    _lasso.PROFILE_ERROR_MISSING_REQUEST: ProfileMissingRequestError,
    _lasso.PROFILE_ERROR_INVALID_ARTIFACT: ProfileInvalidArtifactError,
    _lasso.SOAP_ERROR_MISSING_ENVELOPE: SoapMissingEnvelopeError,
    _lasso.PROFILE_ERROR_IDENTITY_NOT_FOUND: ProfileIdentityNotFoundError,
    _lasso.PROFILE_ERROR_INVALID_MSG: ProfileInvalidMsgError,
    _lasso.PROFILE_ERROR_UNSUPPORTED_PROFILE: ProfileUnsupportedProfileError,
    _lasso.PROVIDER_ERROR_MISSING_PUBLIC_KEY: ProviderMissingPublicKeyError,
    _lasso.LOGIN_ERROR_CONSENT_NOT_OBTAINED: LoginConsentNotObtainedError,
    _lasso.DST_ERROR_QUERY_FAILED: DstQueryFailedError,
    _lasso.PROFILE_ERROR_MISSING_SERVICE_INSTANCE: ProfileMissingServiceInstanceError,
    _lasso.DST_ERROR_QUERY_NOT_FOUND: DstQueryNotFoundError,
    _lasso.WSF_PROFILE_ERROR_REDIRECT_REQUEST: WsfprofileRedirectRequestError,
    _lasso.DS_ERROR_DECRYPTION_FAILED_MISSING_PRIVATE_KEY: DsDecryptionFailedMissingPrivateKeyError,
    _lasso.DISCOVERY_ERROR_FAILED_TO_BUILD_ENDPOINT_REFERENCE: DiscoveryFailedToBuildEndpointReferenceError,
    _lasso.DS_ERROR_PUBLIC_KEY_LOAD_FAILED: DsPublicKeyLoadFailedError,
    _lasso.SERVER_ERROR_INVALID_XML: ServerInvalidXmlError,
    _lasso.PROFILE_ERROR_MISSING_ASSERTION: ProfileMissingAssertionError,
    _lasso.IDWSF2_DST_ERROR_PARTIAL_FAILURE: Idwsf2DstPartialFailureError,
    _lasso.PROFILE_ERROR_UNKNOWN_PROFILE_URL: ProfileUnknownProfileUrlError,
    _lasso.PROFILE_ERROR_INVALID_QUERY: ProfileInvalidQueryError,
    _lasso.PROFILE_ERROR_CANNOT_FIND_A_PROVIDER: ProfileCannotFindAProviderError,
    _lasso.DEFEDERATION_ERROR_MISSING_NAME_IDENTIFIER: DefederationMissingNameIdentifierError,
    _lasso.PARAM_ERROR_INVALID_VALUE: ParamInvalidValueError,
    _lasso.DS_ERROR_SIGNATURE_VERIFICATION_FAILED: DsSignatureVerificationFailedError,
    _lasso.PROFILE_ERROR_MISSING_ENDPOINT_REFERENCE_ADDRESS: ProfileMissingEndpointReferenceAddressError,
    _lasso.PROFILE_ERROR_ENDPOINT_INDEX_NOT_FOUND: ProfileEndpointIndexNotFoundError,
    _lasso.SERVER_ERROR_NO_PROVIDER_LOADED: ServerNoProviderLoadedError,
    _lasso.DATA_SERVICE_ERROR_UNREGISTERED_DST: DataserviceUnregisteredDstError,
    _lasso.LOGIN_ERROR_INVALID_SIGNATURE: LoginInvalidSignatureError,
    _lasso.ASSERTION_QUERY_ERROR_NOT_AN_ATTRIBUTE_QUERY: AssertionqueryNotAnAttributeQueryError,
    _lasso.LOGIN_ERROR_UNSIGNED_AUTHN_REQUEST: LoginUnsignedAuthnRequestError,
    _lasso.SERVER_ERROR_SET_ENCRYPTION_PRIVATE_KEY_FAILED: ServerSetEncryptionPrivateKeyFailedError,
    _lasso.DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED: DsSignatureTmplCreationFailedError,
    _lasso.PROFILE_ERROR_INVALID_ASSERTION: ProfileInvalidAssertionError,
    _lasso.IDWSF2_DISCOVERY_ERROR_NOT_FOUND: Idwsf2DiscoveryNotFoundError,
    _lasso.DISCOVERY_ERROR_SVC_METADATA_ASSOCIATION_ADD_FAILED: DiscoverySvcMetadataAssociationAddFailedError,
    _lasso.DS_ERROR_CONTEXT_CREATION_FAILED: DsContextCreationFailedError,
    _lasso.PROFILE_ERROR_MISSING_SERVICE_DESCRIPTION: ProfileMissingServiceDescriptionError,
    _lasso.PROFILE_ERROR_MISSING_REMOTE_PROVIDERID: ProfileMissingRemoteProvideridError,
    _lasso.PARAM_ERROR_NON_INITIALIZED_OBJECT: ParamNonInitializedObjectError,
    _lasso.PROFILE_ERROR_MISSING_RESPONSE: ProfileMissingResponseError,
    _lasso.LOGOUT_ERROR_REQUEST_DENIED: LogoutRequestDeniedError,
    _lasso.PAOS_ERROR_MISSING_RESPONSE: PaosMissingResponseError,
    _lasso.XML_ERROR_MISSING_NAMESPACE: XmlMissingNamespaceError,
    _lasso.ASSERTION_QUERY_ERROR_ATTRIBUTE_REQUEST_ALREADY_EXIST: AssertionqueryAttributeRequestAlreadyExistError,
    _lasso.PROFILE_ERROR_MISSING_ARTIFACT: ProfileMissingArtifactError,
    _lasso.WSF_PROFILE_ERROR_MISSING_CORRELATION: WsfprofileMissingCorrelationError,
    _lasso.SERVER_ERROR_ADD_PROVIDER_PROTOCOL_MISMATCH: ServerAddProviderProtocolMismatchError,
    _lasso.PROFILE_ERROR_MISSING_STATUS_CODE: ProfileMissingStatusCodeError,
    _lasso.PROFILE_ERROR_BAD_IDENTITY_DUMP: ProfileBadIdentityDumpError,
    _lasso.PROFILE_ERROR_BUILDING_RESPONSE_FAILED: ProfileBuildingResponseFailedError,
    _lasso.DST_ERROR_MALFORMED_QUERY: DstMalformedQueryError,
    _lasso.DATA_SERVICE_ERROR_CANNOT_ADD_ITEM: DataserviceCannotAddItemError,
    _lasso.LOGIN_ERROR_NO_DEFAULT_ENDPOINT: LoginNoDefaultEndpointError,
    _lasso.IDWSF2_DST_ERROR_DUPLICATE_ITEM: Idwsf2DstDuplicateItemError,
    _lasso.PROFILE_ERROR_BAD_SESSION_DUMP: ProfileBadSessionDumpError,
    _lasso.DISCOVERY_ERROR_MISSING_REQUESTED_SERVICE: DiscoveryMissingRequestedServiceError,
    _lasso.SOAP_ERROR_MISSING_BODY: SoapMissingBodyError,
    _lasso.PAOS_ERROR_MISSING_RESPONSE_CONSUMER_URL: PaosMissingResponseConsumerUrlError,
    _lasso.SERVER_ERROR_ADD_PROVIDER_FAILED: ServerAddProviderFailedError,
    _lasso.PROFILE_ERROR_INVALID_HTTP_METHOD: ProfileInvalidHttpMethodError,
    _lasso.LOGIN_ERROR_INVALID_ASSERTION_SIGNATURE: LoginInvalidAssertionSignatureError,
    _lasso.WSF_PROFILE_ERROR_SECURITY_MECHANISM_CHECK_FAILED: WsfprofileSecurityMechanismCheckFailedError,
    _lasso.IDWSF2_DST_ERROR_ITEM_NOT_FOUND: Idwsf2DstItemNotFoundError,
    _lasso.ECP_ERROR_MISSING_SAML_RESPONSE: EcpMissingSamlResponseError,
    _lasso.IDWSF2_DISCOVERY_ERROR_NO_RESULTS: Idwsf2DiscoveryNoResultsError,
    _lasso.PROFILE_ERROR_MISSING_ISSUER: ProfileMissingIssuerError,
    _lasso.XML_ERROR_NODE_CONTENT_NOT_FOUND: XmlNodeContentNotFoundError,
    _lasso.SOAP_ERROR_MISSING_HEADER: SoapMissingHeaderError,
    _lasso.PROFILE_ERROR_UNKNOWN_ISSUER: ProfileUnknownIssuerError,
}

### Constants (both enums and defines)
CHECK_VERSION_EXACT = _lasso.CHECK_VERSION_EXACT
CHECK_VERSIONABI_COMPATIBLE = _lasso.CHECK_VERSIONABI_COMPATIBLE
CHECK_VERSION_NUMERIC = _lasso.CHECK_VERSION_NUMERIC
ERROR_UNDEFINED = _lasso.ERROR_UNDEFINED
ERROR_UNIMPLEMENTED = _lasso.ERROR_UNIMPLEMENTED
ERROR_OUT_OF_MEMORY = _lasso.ERROR_OUT_OF_MEMORY
ERROR_CAST_FAILED = _lasso.ERROR_CAST_FAILED
XML_ERROR_NODE_NOT_FOUND = _lasso.XML_ERROR_NODE_NOT_FOUND
XML_ERROR_NODE_CONTENT_NOT_FOUND = _lasso.XML_ERROR_NODE_CONTENT_NOT_FOUND
XML_ERROR_ATTR_NOT_FOUND = _lasso.XML_ERROR_ATTR_NOT_FOUND
XML_ERROR_ATTR_VALUE_NOT_FOUND = _lasso.XML_ERROR_ATTR_VALUE_NOT_FOUND
XML_ERROR_INVALID_FILE = _lasso.XML_ERROR_INVALID_FILE
XML_ERROR_OBJECT_CONSTRUCTION_FAILED = _lasso.XML_ERROR_OBJECT_CONSTRUCTION_FAILED
XML_ERROR_MISSING_NAMESPACE = _lasso.XML_ERROR_MISSING_NAMESPACE
XML_ERROR_SCHEMA_INVALID_FRAGMENT = _lasso.XML_ERROR_SCHEMA_INVALID_FRAGMENT
XML_ERROR_ATTR_VALUE_INVALID = _lasso.XML_ERROR_ATTR_VALUE_INVALID
DS_ERROR_SIGNATURE_NOT_FOUND = _lasso.DS_ERROR_SIGNATURE_NOT_FOUND
DS_ERROR_INVALID_SIGNATURE = _lasso.DS_ERROR_INVALID_SIGNATURE
DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED = _lasso.DS_ERROR_SIGNATURE_TMPL_CREATION_FAILED
DS_ERROR_CONTEXT_CREATION_FAILED = _lasso.DS_ERROR_CONTEXT_CREATION_FAILED
DS_ERROR_PUBLIC_KEY_LOAD_FAILED = _lasso.DS_ERROR_PUBLIC_KEY_LOAD_FAILED
DS_ERROR_PRIVATE_KEY_LOAD_FAILED = _lasso.DS_ERROR_PRIVATE_KEY_LOAD_FAILED
DS_ERROR_CERTIFICATE_LOAD_FAILED = _lasso.DS_ERROR_CERTIFICATE_LOAD_FAILED
DS_ERROR_SIGNATURE_FAILED = _lasso.DS_ERROR_SIGNATURE_FAILED
DS_ERROR_KEYS_MNGR_CREATION_FAILED = _lasso.DS_ERROR_KEYS_MNGR_CREATION_FAILED
DS_ERROR_KEYS_MNGR_INIT_FAILED = _lasso.DS_ERROR_KEYS_MNGR_INIT_FAILED
DS_ERROR_SIGNATURE_VERIFICATION_FAILED = _lasso.DS_ERROR_SIGNATURE_VERIFICATION_FAILED
DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED = _lasso.DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED
DS_ERROR_INVALID_SIGALG = _lasso.DS_ERROR_INVALID_SIGALG
DS_ERROR_DIGEST_COMPUTE_FAILED = _lasso.DS_ERROR_DIGEST_COMPUTE_FAILED
DS_ERROR_SIGNATURE_TEMPLATE_NOT_FOUND = _lasso.DS_ERROR_SIGNATURE_TEMPLATE_NOT_FOUND
DS_ERROR_TOO_MUCH_REFERENCES = _lasso.DS_ERROR_TOO_MUCH_REFERENCES
DS_ERROR_INVALID_REFERENCE_FOR_SAML = _lasso.DS_ERROR_INVALID_REFERENCE_FOR_SAML
DS_ERROR_DECRYPTION_FAILED = _lasso.DS_ERROR_DECRYPTION_FAILED
DS_ERROR_ENCRYPTION_FAILED = _lasso.DS_ERROR_ENCRYPTION_FAILED
DS_ERROR_DECRYPTION_FAILED_MISSING_PRIVATE_KEY = _lasso.DS_ERROR_DECRYPTION_FAILED_MISSING_PRIVATE_KEY
SERVER_ERROR_PROVIDER_NOT_FOUND = _lasso.SERVER_ERROR_PROVIDER_NOT_FOUND
SERVER_ERROR_ADD_PROVIDER_FAILED = _lasso.SERVER_ERROR_ADD_PROVIDER_FAILED
SERVER_ERROR_ADD_PROVIDER_PROTOCOL_MISMATCH = _lasso.SERVER_ERROR_ADD_PROVIDER_PROTOCOL_MISMATCH
SERVER_ERROR_SET_ENCRYPTION_PRIVATE_KEY_FAILED = _lasso.SERVER_ERROR_SET_ENCRYPTION_PRIVATE_KEY_FAILED
SERVER_ERROR_INVALID_XML = _lasso.SERVER_ERROR_INVALID_XML
SERVER_ERROR_NO_PROVIDER_LOADED = _lasso.SERVER_ERROR_NO_PROVIDER_LOADED
LOGOUT_ERROR_UNSUPPORTED_PROFILE = _lasso.LOGOUT_ERROR_UNSUPPORTED_PROFILE
LOGOUT_ERROR_REQUEST_DENIED = _lasso.LOGOUT_ERROR_REQUEST_DENIED
LOGOUT_ERROR_FEDERATION_NOT_FOUND = _lasso.LOGOUT_ERROR_FEDERATION_NOT_FOUND
LOGOUT_ERROR_UNKNOWN_PRINCIPAL = _lasso.LOGOUT_ERROR_UNKNOWN_PRINCIPAL
LOGOUT_ERROR_PARTIAL_LOGOUT = _lasso.LOGOUT_ERROR_PARTIAL_LOGOUT
PROFILE_ERROR_INVALID_QUERY = _lasso.PROFILE_ERROR_INVALID_QUERY
PROFILE_ERROR_INVALID_POST_MSG = _lasso.PROFILE_ERROR_INVALID_POST_MSG
PROFILE_ERROR_INVALID_SOAP_MSG = _lasso.PROFILE_ERROR_INVALID_SOAP_MSG
PROFILE_ERROR_MISSING_REQUEST = _lasso.PROFILE_ERROR_MISSING_REQUEST
PROFILE_ERROR_INVALID_HTTP_METHOD = _lasso.PROFILE_ERROR_INVALID_HTTP_METHOD
PROFILE_ERROR_INVALID_PROTOCOLPROFILE = _lasso.PROFILE_ERROR_INVALID_PROTOCOLPROFILE
PROFILE_ERROR_INVALID_MSG = _lasso.PROFILE_ERROR_INVALID_MSG
PROFILE_ERROR_MISSING_REMOTE_PROVIDERID = _lasso.PROFILE_ERROR_MISSING_REMOTE_PROVIDERID
PROFILE_ERROR_UNSUPPORTED_PROFILE = _lasso.PROFILE_ERROR_UNSUPPORTED_PROFILE
PROFILE_ERROR_UNKNOWN_PROFILE_URL = _lasso.PROFILE_ERROR_UNKNOWN_PROFILE_URL
PROFILE_ERROR_IDENTITY_NOT_FOUND = _lasso.PROFILE_ERROR_IDENTITY_NOT_FOUND
PROFILE_ERROR_FEDERATION_NOT_FOUND = _lasso.PROFILE_ERROR_FEDERATION_NOT_FOUND
PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND = _lasso.PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND
PROFILE_ERROR_BUILDING_QUERY_FAILED = _lasso.PROFILE_ERROR_BUILDING_QUERY_FAILED
PROFILE_ERROR_BUILDING_REQUEST_FAILED = _lasso.PROFILE_ERROR_BUILDING_REQUEST_FAILED
PROFILE_ERROR_BUILDING_MESSAGE_FAILED = _lasso.PROFILE_ERROR_BUILDING_MESSAGE_FAILED
PROFILE_ERROR_BUILDING_RESPONSE_FAILED = _lasso.PROFILE_ERROR_BUILDING_RESPONSE_FAILED
PROFILE_ERROR_SESSION_NOT_FOUND = _lasso.PROFILE_ERROR_SESSION_NOT_FOUND
PROFILE_ERROR_BAD_IDENTITY_DUMP = _lasso.PROFILE_ERROR_BAD_IDENTITY_DUMP
PROFILE_ERROR_BAD_SESSION_DUMP = _lasso.PROFILE_ERROR_BAD_SESSION_DUMP
PROFILE_ERROR_MISSING_RESPONSE = _lasso.PROFILE_ERROR_MISSING_RESPONSE
PROFILE_ERROR_MISSING_STATUS_CODE = _lasso.PROFILE_ERROR_MISSING_STATUS_CODE
PROFILE_ERROR_MISSING_ARTIFACT = _lasso.PROFILE_ERROR_MISSING_ARTIFACT
PROFILE_ERROR_MISSING_RESOURCE_OFFERING = _lasso.PROFILE_ERROR_MISSING_RESOURCE_OFFERING
PROFILE_ERROR_MISSING_SERVICE_DESCRIPTION = _lasso.PROFILE_ERROR_MISSING_SERVICE_DESCRIPTION
PROFILE_ERROR_MISSING_SERVICE_TYPE = _lasso.PROFILE_ERROR_MISSING_SERVICE_TYPE
PROFILE_ERROR_MISSING_ASSERTION = _lasso.PROFILE_ERROR_MISSING_ASSERTION
PROFILE_ERROR_MISSING_SUBJECT = _lasso.PROFILE_ERROR_MISSING_SUBJECT
PROFILE_ERROR_MISSING_NAME_IDENTIFIER = _lasso.PROFILE_ERROR_MISSING_NAME_IDENTIFIER
PROFILE_ERROR_INVALID_ARTIFACT = _lasso.PROFILE_ERROR_INVALID_ARTIFACT
PROFILE_ERROR_MISSING_ENCRYPTION_PRIVATE_KEY = _lasso.PROFILE_ERROR_MISSING_ENCRYPTION_PRIVATE_KEY
PROFILE_ERROR_STATUS_NOT_SUCCESS = _lasso.PROFILE_ERROR_STATUS_NOT_SUCCESS
PROFILE_ERROR_MISSING_ISSUER = _lasso.PROFILE_ERROR_MISSING_ISSUER
PROFILE_ERROR_MISSING_SERVICE_INSTANCE = _lasso.PROFILE_ERROR_MISSING_SERVICE_INSTANCE
PROFILE_ERROR_MISSING_ENDPOINT_REFERENCE = _lasso.PROFILE_ERROR_MISSING_ENDPOINT_REFERENCE
PROFILE_ERROR_MISSING_ENDPOINT_REFERENCE_ADDRESS = _lasso.PROFILE_ERROR_MISSING_ENDPOINT_REFERENCE_ADDRESS
PROFILE_ERROR_INVALID_ISSUER = _lasso.PROFILE_ERROR_INVALID_ISSUER
PROFILE_ERROR_MISSING_SERVER = _lasso.PROFILE_ERROR_MISSING_SERVER
PROFILE_ERROR_UNKNOWN_PROVIDER = _lasso.PROFILE_ERROR_UNKNOWN_PROVIDER
PROFILE_ERROR_CANNOT_VERIFY_SIGNATURE = _lasso.PROFILE_ERROR_CANNOT_VERIFY_SIGNATURE
PROFILE_ERROR_CANNOT_FIND_A_PROVIDER = _lasso.PROFILE_ERROR_CANNOT_FIND_A_PROVIDER
PROFILE_ERROR_RESPONSE_DOES_NOT_MATCH_REQUEST = _lasso.PROFILE_ERROR_RESPONSE_DOES_NOT_MATCH_REQUEST
PROFILE_ERROR_INVALID_REQUEST = _lasso.PROFILE_ERROR_INVALID_REQUEST
PROFILE_ERROR_INVALID_RESPONSE = _lasso.PROFILE_ERROR_INVALID_RESPONSE
PROFILE_ERROR_UNSUPPORTED_BINDING = _lasso.PROFILE_ERROR_UNSUPPORTED_BINDING
PROFILE_ERROR_INVALID_ASSERTION_CONDITIONS = _lasso.PROFILE_ERROR_INVALID_ASSERTION_CONDITIONS
PROFILE_ERROR_INVALID_ASSERTION = _lasso.PROFILE_ERROR_INVALID_ASSERTION
PROFILE_ERROR_UNKNOWN_ISSUER = _lasso.PROFILE_ERROR_UNKNOWN_ISSUER
PROFILE_ERROR_ISSUER_IS_NOT_AN_IDP = _lasso.PROFILE_ERROR_ISSUER_IS_NOT_AN_IDP
PROFILE_ERROR_REQUEST_DENIED = _lasso.PROFILE_ERROR_REQUEST_DENIED
PROFILE_ERROR_ENDPOINT_INDEX_NOT_FOUND = _lasso.PROFILE_ERROR_ENDPOINT_INDEX_NOT_FOUND
PROFILE_ERROR_INVALID_IDP_LIST = _lasso.PROFILE_ERROR_INVALID_IDP_LIST
PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ = _lasso.PARAM_ERROR_BAD_TYPE_OR_NULL_OBJ
PARAM_ERROR_INVALID_VALUE = _lasso.PARAM_ERROR_INVALID_VALUE
PARAM_ERROR_CHECK_FAILED = _lasso.PARAM_ERROR_CHECK_FAILED
PARAM_ERROR_NON_INITIALIZED_OBJECT = _lasso.PARAM_ERROR_NON_INITIALIZED_OBJECT
LOGIN_ERROR_FEDERATION_NOT_FOUND = _lasso.LOGIN_ERROR_FEDERATION_NOT_FOUND
LOGIN_ERROR_CONSENT_NOT_OBTAINED = _lasso.LOGIN_ERROR_CONSENT_NOT_OBTAINED
LOGIN_ERROR_INVALID_NAMEIDPOLICY = _lasso.LOGIN_ERROR_INVALID_NAMEIDPOLICY
LOGIN_ERROR_REQUEST_DENIED = _lasso.LOGIN_ERROR_REQUEST_DENIED
LOGIN_ERROR_INVALID_SIGNATURE = _lasso.LOGIN_ERROR_INVALID_SIGNATURE
LOGIN_ERROR_UNSIGNED_AUTHN_REQUEST = _lasso.LOGIN_ERROR_UNSIGNED_AUTHN_REQUEST
LOGIN_ERROR_STATUS_NOT_SUCCESS = _lasso.LOGIN_ERROR_STATUS_NOT_SUCCESS
LOGIN_ERROR_UNKNOWN_PRINCIPAL = _lasso.LOGIN_ERROR_UNKNOWN_PRINCIPAL
LOGIN_ERROR_NO_DEFAULT_ENDPOINT = _lasso.LOGIN_ERROR_NO_DEFAULT_ENDPOINT
LOGIN_ERROR_ASSERTION_REPLAY = _lasso.LOGIN_ERROR_ASSERTION_REPLAY
LOGIN_ERROR_ASSERTION_DOES_NOT_MATCH_REQUEST_ID = _lasso.LOGIN_ERROR_ASSERTION_DOES_NOT_MATCH_REQUEST_ID
LOGIN_ERROR_INVALID_ASSERTION_SIGNATURE = _lasso.LOGIN_ERROR_INVALID_ASSERTION_SIGNATURE
DEFEDERATION_ERROR_MISSING_NAME_IDENTIFIER = _lasso.DEFEDERATION_ERROR_MISSING_NAME_IDENTIFIER
SOAP_ERROR_REDIRECT_REQUEST_FAULT = _lasso.SOAP_ERROR_REDIRECT_REQUEST_FAULT
SOAP_FAULT_REDIRECT_REQUEST = _lasso.SOAP_FAULT_REDIRECT_REQUEST
SOAP_ERROR_MISSING_ENVELOPE = _lasso.SOAP_ERROR_MISSING_ENVELOPE
SOAP_ERROR_MISSING_HEADER = _lasso.SOAP_ERROR_MISSING_HEADER
SOAP_ERROR_MISSING_BODY = _lasso.SOAP_ERROR_MISSING_BODY
SOAP_ERROR_MISSING_SOAP_FAULT_DETAIL = _lasso.SOAP_ERROR_MISSING_SOAP_FAULT_DETAIL
NAME_IDENTIFIER_MAPPING_ERROR_MISSING_TARGET_NAMESPACE = _lasso.NAME_IDENTIFIER_MAPPING_ERROR_MISSING_TARGET_NAMESPACE
NAME_IDENTIFIER_MAPPING_ERROR_FORBIDDEN_CALL_ON_THIS_SIDE = _lasso.NAME_IDENTIFIER_MAPPING_ERROR_FORBIDDEN_CALL_ON_THIS_SIDE
NAME_IDENTIFIER_MAPPING_ERROR_MISSING_TARGET_IDENTIFIER = _lasso.NAME_IDENTIFIER_MAPPING_ERROR_MISSING_TARGET_IDENTIFIER
DATA_SERVICE_ERROR_UNREGISTERED_DST = _lasso.DATA_SERVICE_ERROR_UNREGISTERED_DST
DATA_SERVICE_ERROR_CANNOT_ADD_ITEM = _lasso.DATA_SERVICE_ERROR_CANNOT_ADD_ITEM
WSF_PROFILE_ERROR_MISSING_CORRELATION = _lasso.WSF_PROFILE_ERROR_MISSING_CORRELATION
WSF_PROFILE_ERROR_MISSING_SECURITY = _lasso.WSF_PROFILE_ERROR_MISSING_SECURITY
WSF_PROFILE_ERROR_MISSING_ASSERTION_ID = _lasso.WSF_PROFILE_ERROR_MISSING_ASSERTION_ID
WSF_PROFILE_ERROR_MISSING_ENDPOINT = _lasso.WSF_PROFILE_ERROR_MISSING_ENDPOINT
WSF_PROFILE_ERROR_SOAP_FAULT = _lasso.WSF_PROFILE_ERROR_SOAP_FAULT
WSF_PROFILE_ERROR_UNSUPPORTED_SECURITY_MECHANISM = _lasso.WSF_PROFILE_ERROR_UNSUPPORTED_SECURITY_MECHANISM
WSF_PROFILE_ERROR_MISSING_DESCRIPTION = _lasso.WSF_PROFILE_ERROR_MISSING_DESCRIPTION
WSF_PROFILE_ERROR_MISSING_RESOURCE_ID = _lasso.WSF_PROFILE_ERROR_MISSING_RESOURCE_ID
WSF_PROFILE_ERROR_MISSING_CREDENTIAL_REF = _lasso.WSF_PROFILE_ERROR_MISSING_CREDENTIAL_REF
WSF_PROFILE_ERROR_INVALID_OR_MISSING_REFERENCE_TO_MESSAGE_ID = _lasso.WSF_PROFILE_ERROR_INVALID_OR_MISSING_REFERENCE_TO_MESSAGE_ID
WSF_PROFILE_ERROR_SECURITY_MECHANISM_CHECK_FAILED = _lasso.WSF_PROFILE_ERROR_SECURITY_MECHANISM_CHECK_FAILED
WSF_PROFILE_ERROR_UNKNOWN_STATUS_CODE = _lasso.WSF_PROFILE_ERROR_UNKNOWN_STATUS_CODE
WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED = _lasso.WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED
WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED_FOR_DATA = _lasso.WSF_PROFILE_ERROR_SERVER_INTERACTION_REQUIRED_FOR_DATA
WSF_PROFILE_ERROR_REDIRECT_REQUEST = _lasso.WSF_PROFILE_ERROR_REDIRECT_REQUEST
WSF_PROFILE_ERROR_REDIRECT_REQUEST_UNSUPPORTED_BY_REQUESTER = _lasso.WSF_PROFILE_ERROR_REDIRECT_REQUEST_UNSUPPORTED_BY_REQUESTER
WSF_PROFILE_ERROR_MISSING_SENDER_ID = _lasso.WSF_PROFILE_ERROR_MISSING_SENDER_ID
DISCOVERY_ERROR_SVC_METADATA_REGISTER_FAILED = _lasso.DISCOVERY_ERROR_SVC_METADATA_REGISTER_FAILED
DISCOVERY_ERROR_SVC_METADATA_ASSOCIATION_ADD_FAILED = _lasso.DISCOVERY_ERROR_SVC_METADATA_ASSOCIATION_ADD_FAILED
DISCOVERY_ERROR_MISSING_REQUESTED_SERVICE = _lasso.DISCOVERY_ERROR_MISSING_REQUESTED_SERVICE
DISCOVERY_ERROR_FAILED_TO_BUILD_ENDPOINT_REFERENCE = _lasso.DISCOVERY_ERROR_FAILED_TO_BUILD_ENDPOINT_REFERENCE
DST_ERROR_MISSING_SERVICE_DATA = _lasso.DST_ERROR_MISSING_SERVICE_DATA
DST_ERROR_QUERY_FAILED = _lasso.DST_ERROR_QUERY_FAILED
DST_ERROR_QUERY_PARTIALLY_FAILED = _lasso.DST_ERROR_QUERY_PARTIALLY_FAILED
DST_ERROR_MODIFY_FAILED = _lasso.DST_ERROR_MODIFY_FAILED
DST_ERROR_MODIFY_PARTIALLY_FAILED = _lasso.DST_ERROR_MODIFY_PARTIALLY_FAILED
DST_ERROR_NEW_DATA_MISSING = _lasso.DST_ERROR_NEW_DATA_MISSING
DST_ERROR_QUERY_NOT_FOUND = _lasso.DST_ERROR_QUERY_NOT_FOUND
DST_ERROR_NO_DATA = _lasso.DST_ERROR_NO_DATA
DST_ERROR_MALFORMED_QUERY = _lasso.DST_ERROR_MALFORMED_QUERY
DST_ERROR_EMPTY_REQUEST = _lasso.DST_ERROR_EMPTY_REQUEST
REGISTRY_ERROR_KEY_EXISTS = _lasso.REGISTRY_ERROR_KEY_EXISTS
PROVIDER_ERROR_MISSING_PUBLIC_KEY = _lasso.PROVIDER_ERROR_MISSING_PUBLIC_KEY
WSSEC_ERROR_MISSING_SECURITY_TOKEN = _lasso.WSSEC_ERROR_MISSING_SECURITY_TOKEN
WSSEC_ERROR_BAD_PASSWORD = _lasso.WSSEC_ERROR_BAD_PASSWORD
IDWSF2_DISCOVERY_ERROR_FAILED = _lasso.IDWSF2_DISCOVERY_ERROR_FAILED
IDWSF2_DISCOVERY_ERROR_FORBIDDEN = _lasso.IDWSF2_DISCOVERY_ERROR_FORBIDDEN
IDWSF2_DISCOVERY_ERROR_DUPLICATE = _lasso.IDWSF2_DISCOVERY_ERROR_DUPLICATE
IDWSF2_DISCOVERY_ERROR_LOGICAL_DUPLICATE = _lasso.IDWSF2_DISCOVERY_ERROR_LOGICAL_DUPLICATE
IDWSF2_DISCOVERY_ERROR_NO_RESULTS = _lasso.IDWSF2_DISCOVERY_ERROR_NO_RESULTS
IDWSF2_DISCOVERY_ERROR_NOT_FOUND = _lasso.IDWSF2_DISCOVERY_ERROR_NOT_FOUND
IDWSF2_DST_ERROR_DUPLICATE_ITEM = _lasso.IDWSF2_DST_ERROR_DUPLICATE_ITEM
IDWSF2_DST_ERROR_PARTIAL_FAILURE = _lasso.IDWSF2_DST_ERROR_PARTIAL_FAILURE
IDWSF2_DST_ERROR_UNKNOWN_STATUS_CODE = _lasso.IDWSF2_DST_ERROR_UNKNOWN_STATUS_CODE
IDWSF2_DST_ERROR_ITEM_NOT_FOUND = _lasso.IDWSF2_DST_ERROR_ITEM_NOT_FOUND
ASSERTION_QUERY_ERROR_ATTRIBUTE_REQUEST_ALREADY_EXIST = _lasso.ASSERTION_QUERY_ERROR_ATTRIBUTE_REQUEST_ALREADY_EXIST
ASSERTION_QUERY_ERROR_NOT_AN_ATTRIBUTE_QUERY = _lasso.ASSERTION_QUERY_ERROR_NOT_AN_ATTRIBUTE_QUERY
XMLENC_ERROR_INVALID_ENCRYPTED_DATA = _lasso.XMLENC_ERROR_INVALID_ENCRYPTED_DATA
PAOS_ERROR_MISSING_REQUEST = _lasso.PAOS_ERROR_MISSING_REQUEST
PAOS_ERROR_MISSING_RESPONSE = _lasso.PAOS_ERROR_MISSING_RESPONSE
PAOS_ERROR_MISSING_RESPONSE_CONSUMER_URL = _lasso.PAOS_ERROR_MISSING_RESPONSE_CONSUMER_URL
ECP_ERROR_MISSING_REQUEST = _lasso.ECP_ERROR_MISSING_REQUEST
ECP_ERROR_MISSING_RESPONSE = _lasso.ECP_ERROR_MISSING_RESPONSE
ECP_ERROR_MISSING_RELAYSTATE = _lasso.ECP_ERROR_MISSING_RELAYSTATE
ECP_ERROR_MISSING_AUTHN_REQUEST = _lasso.ECP_ERROR_MISSING_AUTHN_REQUEST
ECP_ERROR_MISSING_SAML_RESPONSE = _lasso.ECP_ERROR_MISSING_SAML_RESPONSE
ECP_ERROR_ASSERTION_CONSUMER_URL_MISMATCH = _lasso.ECP_ERROR_ASSERTION_CONSUMER_URL_MISMATCH
RD_COMP_H = _lasso.RD_COMP_H
SOAP_ENV_HREF = _lasso.SOAP_ENV_HREF
SOAP_ENV_PREFIX = _lasso.SOAP_ENV_PREFIX
SOAP_ENV_ACTOR = _lasso.SOAP_ENV_ACTOR
SOAP_FAULT_CODE_SERVER = _lasso.SOAP_FAULT_CODE_SERVER
SOAP_FAULT_CODE_CLIENT = _lasso.SOAP_FAULT_CODE_CLIENT
SOAP_FAULT_CODE_MUST_UNDERSTAND = _lasso.SOAP_FAULT_CODE_MUST_UNDERSTAND
SOAP_FAULT_CODE_VERSION_MISMATCH = _lasso.SOAP_FAULT_CODE_VERSION_MISMATCH
PRIVATE_STATUS_CODE_FAILED_TO_RESTORE_ARTIFACT = _lasso.PRIVATE_STATUS_CODE_FAILED_TO_RESTORE_ARTIFACT
WSUTIL1_HREF = _lasso.WSUTIL1_HREF
WSUTIL1_PREFIX = _lasso.WSUTIL1_PREFIX
XMLENC_HREF = _lasso.XMLENC_HREF
XMLENC_PREFIX = _lasso.XMLENC_PREFIX
LASSO_HREF = _lasso.LASSO_HREF
LASSO_PREFIX = _lasso.LASSO_PREFIX
PYTHON_HREF = _lasso.PYTHON_HREF
SIGNATURE_TYPE_ATTRIBUTE = _lasso.SIGNATURE_TYPE_ATTRIBUTE
SIGNATURE_METHOD_ATTRIBUTE = _lasso.SIGNATURE_METHOD_ATTRIBUTE
PRIVATE_KEY_ATTRIBUTE = _lasso.PRIVATE_KEY_ATTRIBUTE
PRIVATE_KEY_PASSWORD_ATTRIBUTE = _lasso.PRIVATE_KEY_PASSWORD_ATTRIBUTE
CERTIFICATE_ATTRIBUTE = _lasso.CERTIFICATE_ATTRIBUTE
LIB_HREF = _lasso.LIB_HREF
LIB_PREFIX = _lasso.LIB_PREFIX
LIB_MAJOR_VERSION_N = _lasso.LIB_MAJOR_VERSION_N
LIB_MINOR_VERSION_N = _lasso.LIB_MINOR_VERSION_N
LIB_NAMEID_POLICY_TYPE_NONE = _lasso.LIB_NAMEID_POLICY_TYPE_NONE
LIB_NAMEID_POLICY_TYPE_ONE_TIME = _lasso.LIB_NAMEID_POLICY_TYPE_ONE_TIME
LIB_NAMEID_POLICY_TYPE_FEDERATED = _lasso.LIB_NAMEID_POLICY_TYPE_FEDERATED
LIB_NAMEID_POLICY_TYPE_ANY = _lasso.LIB_NAMEID_POLICY_TYPE_ANY
LIB_AUTHN_CONTEXT_CLASS_REF_INTERNET_PROTOCOL = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_INTERNET_PROTOCOL
LIB_AUTHN_CONTEXT_CLASS_REF_INTERNET_PROTOCOL_PASSWORD = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_INTERNET_PROTOCOL_PASSWORD
LIB_AUTHN_CONTEXT_CLASS_REF_MOBILE_ONE_FACTOR_UNREGISTERED = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_MOBILE_ONE_FACTOR_UNREGISTERED
LIB_AUTHN_CONTEXT_CLASS_REF_MOBILE_TWO_FACTOR_UNREGISTERED = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_MOBILE_TWO_FACTOR_UNREGISTERED
LIB_AUTHN_CONTEXT_CLASS_REF_MOBILE_ONE_FACTOR_CONTRACT = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_MOBILE_ONE_FACTOR_CONTRACT
LIB_AUTHN_CONTEXT_CLASS_REF_MOBILE_TWO_FACTOR_CONTRACT = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_MOBILE_TWO_FACTOR_CONTRACT
LIB_AUTHN_CONTEXT_CLASS_REF_PASSWORD = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_PASSWORD
LIB_AUTHN_CONTEXT_CLASS_REF_PASSWORD_PROTECTED_TRANSPORT = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_PASSWORD_PROTECTED_TRANSPORT
LIB_AUTHN_CONTEXT_CLASS_REF_PREVIOUS_SESSION = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_PREVIOUS_SESSION
LIB_AUTHN_CONTEXT_CLASS_REF_SMARTCARD = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_SMARTCARD
LIB_AUTHN_CONTEXT_CLASS_REF_SMARTCARD_PKI = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_SMARTCARD_PKI
LIB_AUTHN_CONTEXT_CLASS_REF_SOFTWARE_PKI = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_SOFTWARE_PKI
LIB_AUTHN_CONTEXT_CLASS_REF_TIME_SYNC_TOKEN = _lasso.LIB_AUTHN_CONTEXT_CLASS_REF_TIME_SYNC_TOKEN
LIB_AUTHN_CONTEXT_COMPARISON_EXACT = _lasso.LIB_AUTHN_CONTEXT_COMPARISON_EXACT
LIB_AUTHN_CONTEXT_COMPARISON_MINIMUM = _lasso.LIB_AUTHN_CONTEXT_COMPARISON_MINIMUM
LIB_AUTHN_CONTEXT_COMPARISON_MAXIMUM = _lasso.LIB_AUTHN_CONTEXT_COMPARISON_MAXIMUM
LIB_AUTHN_CONTEXT_COMPARISON_BETTER = _lasso.LIB_AUTHN_CONTEXT_COMPARISON_BETTER
LIB_STATUS_CODE_FEDERATION_DOES_NOT_EXIST = _lasso.LIB_STATUS_CODE_FEDERATION_DOES_NOT_EXIST
LIB_STATUS_CODE_INVALID_ASSERTION_CONSUMER_SERVICE_INDEX = _lasso.LIB_STATUS_CODE_INVALID_ASSERTION_CONSUMER_SERVICE_INDEX
LIB_STATUS_CODE_INVALID_SIGNATURE = _lasso.LIB_STATUS_CODE_INVALID_SIGNATURE
LIB_STATUS_CODE_NO_AUTHN_CONTEXT = _lasso.LIB_STATUS_CODE_NO_AUTHN_CONTEXT
LIB_STATUS_CODE_NO_AVAILABLEIDP = _lasso.LIB_STATUS_CODE_NO_AVAILABLEIDP
LIB_STATUS_CODE_NO_PASSIVE = _lasso.LIB_STATUS_CODE_NO_PASSIVE
LIB_STATUS_CODE_NO_SUPPORTEDIDP = _lasso.LIB_STATUS_CODE_NO_SUPPORTEDIDP
LIB_STATUS_CODE_PROXY_COUNT_EXCEEDED = _lasso.LIB_STATUS_CODE_PROXY_COUNT_EXCEEDED
LIB_STATUS_CODE_UNKNOWN_PRINCIPAL = _lasso.LIB_STATUS_CODE_UNKNOWN_PRINCIPAL
LIB_STATUS_CODE_UNSIGNED_AUTHN_REQUEST = _lasso.LIB_STATUS_CODE_UNSIGNED_AUTHN_REQUEST
LIB_STATUS_CODE_UNSUPPORTED_PROFILE = _lasso.LIB_STATUS_CODE_UNSUPPORTED_PROFILE
LIB_PROTOCOL_PROFILE_BRWS_ART = _lasso.LIB_PROTOCOL_PROFILE_BRWS_ART
LIB_PROTOCOL_PROFILE_BRWS_POST = _lasso.LIB_PROTOCOL_PROFILE_BRWS_POST
LIB_PROTOCOL_PROFILE_BRWS_LECP = _lasso.LIB_PROTOCOL_PROFILE_BRWS_LECP
LIB_PROTOCOL_PROFILE_FED_TERM_IDP_HTTP = _lasso.LIB_PROTOCOL_PROFILE_FED_TERM_IDP_HTTP
LIB_PROTOCOL_PROFILE_FED_TERM_IDP_SOAP = _lasso.LIB_PROTOCOL_PROFILE_FED_TERM_IDP_SOAP
LIB_PROTOCOL_PROFILE_FED_TERM_SP_HTTP = _lasso.LIB_PROTOCOL_PROFILE_FED_TERM_SP_HTTP
LIB_PROTOCOL_PROFILE_FED_TERM_SP_SOAP = _lasso.LIB_PROTOCOL_PROFILE_FED_TERM_SP_SOAP
LIB_PROTOCOL_PROFILE_NIM_SP_HTTP = _lasso.LIB_PROTOCOL_PROFILE_NIM_SP_HTTP
LIB_PROTOCOL_PROFILE_RNI_IDP_HTTP = _lasso.LIB_PROTOCOL_PROFILE_RNI_IDP_HTTP
LIB_PROTOCOL_PROFILE_RNI_IDP_SOAP = _lasso.LIB_PROTOCOL_PROFILE_RNI_IDP_SOAP
LIB_PROTOCOL_PROFILE_RNI_SP_HTTP = _lasso.LIB_PROTOCOL_PROFILE_RNI_SP_HTTP
LIB_PROTOCOL_PROFILE_RNI_SP_SOAP = _lasso.LIB_PROTOCOL_PROFILE_RNI_SP_SOAP
LIB_PROTOCOL_PROFILE_SLO_SP_HTTP = _lasso.LIB_PROTOCOL_PROFILE_SLO_SP_HTTP
LIB_PROTOCOL_PROFILE_SLO_SP_SOAP = _lasso.LIB_PROTOCOL_PROFILE_SLO_SP_SOAP
LIB_PROTOCOL_PROFILE_SLO_IDP_HTTP = _lasso.LIB_PROTOCOL_PROFILE_SLO_IDP_HTTP
LIB_PROTOCOL_PROFILE_SLO_IDP_SOAP = _lasso.LIB_PROTOCOL_PROFILE_SLO_IDP_SOAP
LIB_NAME_IDENTIFIER_FORMAT_FEDERATED = _lasso.LIB_NAME_IDENTIFIER_FORMAT_FEDERATED
LIB_NAME_IDENTIFIER_FORMAT_ONE_TIME = _lasso.LIB_NAME_IDENTIFIER_FORMAT_ONE_TIME
LIB_NAME_IDENTIFIER_FORMAT_ENCRYPTED = _lasso.LIB_NAME_IDENTIFIER_FORMAT_ENCRYPTED
LIB_NAME_IDENTIFIER_FORMAT_ENTITYID = _lasso.LIB_NAME_IDENTIFIER_FORMAT_ENTITYID
LIB_CONSENT_OBTAINED = _lasso.LIB_CONSENT_OBTAINED
LIB_CONSENT_OBTAINED_PRIOR = _lasso.LIB_CONSENT_OBTAINED_PRIOR
LIB_CONSENT_OBTAINED_CURRENT_IMPLICIT = _lasso.LIB_CONSENT_OBTAINED_CURRENT_IMPLICIT
LIB_CONSENT_OBTAINED_CURRENT_EXPLICIT = _lasso.LIB_CONSENT_OBTAINED_CURRENT_EXPLICIT
LIB_CONSENT_UNAVAILABLE = _lasso.LIB_CONSENT_UNAVAILABLE
LIB_CONSENT_INAPPLICABLE = _lasso.LIB_CONSENT_INAPPLICABLE
METADATA_HREF = _lasso.METADATA_HREF
METADATA_PREFIX = _lasso.METADATA_PREFIX
SAML_ASSERTION_HREF = _lasso.SAML_ASSERTION_HREF
SAML_ASSERTION_PREFIX = _lasso.SAML_ASSERTION_PREFIX
SAML_PROTOCOL_HREF = _lasso.SAML_PROTOCOL_HREF
SAML_PROTOCOL_PREFIX = _lasso.SAML_PROTOCOL_PREFIX
SAML_MAJOR_VERSION_N = _lasso.SAML_MAJOR_VERSION_N
SAML_MINOR_VERSION_N = _lasso.SAML_MINOR_VERSION_N
SAML_STATUS_CODE_SUCCESS = _lasso.SAML_STATUS_CODE_SUCCESS
SAML_STATUS_CODE_VERSION_MISMATCH = _lasso.SAML_STATUS_CODE_VERSION_MISMATCH
SAML_STATUS_CODE_REQUESTER = _lasso.SAML_STATUS_CODE_REQUESTER
SAML_STATUS_CODE_RESPONDER = _lasso.SAML_STATUS_CODE_RESPONDER
SAML_STATUS_CODE_REQUEST_VERSION_TOO_HIGH = _lasso.SAML_STATUS_CODE_REQUEST_VERSION_TOO_HIGH
SAML_STATUS_CODE_REQUEST_VERSION_TOO_LOW = _lasso.SAML_STATUS_CODE_REQUEST_VERSION_TOO_LOW
SAML_STATUS_CODE_REQUEST_VERSION_DEPRECATED = _lasso.SAML_STATUS_CODE_REQUEST_VERSION_DEPRECATED
SAML_STATUS_CODE_TOO_MANY_RESPONSES = _lasso.SAML_STATUS_CODE_TOO_MANY_RESPONSES
SAML_STATUS_CODE_RESOURCE_NOT_RECOGNIZED = _lasso.SAML_STATUS_CODE_RESOURCE_NOT_RECOGNIZED
SAML_STATUS_CODE_REQUEST_DENIED = _lasso.SAML_STATUS_CODE_REQUEST_DENIED
SAML_AUTHENTICATION_METHOD_PASSWORD = _lasso.SAML_AUTHENTICATION_METHOD_PASSWORD
SAML_AUTHENTICATION_METHOD_KERBEROS = _lasso.SAML_AUTHENTICATION_METHOD_KERBEROS
SAML_AUTHENTICATION_METHOD_SECURE_REMOTE_PASSWORD = _lasso.SAML_AUTHENTICATION_METHOD_SECURE_REMOTE_PASSWORD
SAML_AUTHENTICATION_METHOD_HARDWARE_TOKEN = _lasso.SAML_AUTHENTICATION_METHOD_HARDWARE_TOKEN
SAML_AUTHENTICATION_METHOD_SMARTCARD_PKI = _lasso.SAML_AUTHENTICATION_METHOD_SMARTCARD_PKI
SAML_AUTHENTICATION_METHOD_SOFTWARE_PKI = _lasso.SAML_AUTHENTICATION_METHOD_SOFTWARE_PKI
SAML_AUTHENTICATION_METHOD_PGP = _lasso.SAML_AUTHENTICATION_METHOD_PGP
SAML_AUTHENTICATION_METHODS_PKI = _lasso.SAML_AUTHENTICATION_METHODS_PKI
SAML_AUTHENTICATION_METHOD_XKMS = _lasso.SAML_AUTHENTICATION_METHOD_XKMS
SAML_AUTHENTICATION_METHOD_XMLD_SIG = _lasso.SAML_AUTHENTICATION_METHOD_XMLD_SIG
SAML_AUTHENTICATION_METHOD_UNSPECIFIED = _lasso.SAML_AUTHENTICATION_METHOD_UNSPECIFIED
SAML_AUTHENTICATION_METHOD_LIBERTY = _lasso.SAML_AUTHENTICATION_METHOD_LIBERTY
SAML_CONFIRMATION_METHOD_ARTIFACT = _lasso.SAML_CONFIRMATION_METHOD_ARTIFACT
SAML_CONFIRMATION_METHOD_ARTIFACT01 = _lasso.SAML_CONFIRMATION_METHOD_ARTIFACT01
SAML_CONFIRMATION_METHOD_BEARER = _lasso.SAML_CONFIRMATION_METHOD_BEARER
SAML_CONFIRMATION_METHOD_HOLDER_OF_KEY = _lasso.SAML_CONFIRMATION_METHOD_HOLDER_OF_KEY
SAML_CONFIRMATION_METHOD_SENDER_VOUCHES = _lasso.SAML_CONFIRMATION_METHOD_SENDER_VOUCHES
PAOS_HREF = _lasso.PAOS_HREF
PAOS_PREFIX = _lasso.PAOS_PREFIX
ECP_HREF = _lasso.ECP_HREF
ECP_PREFIX = _lasso.ECP_PREFIX
XSI_HREF = _lasso.XSI_HREF
XSI_PREFIX = _lasso.XSI_PREFIX
MESSAGE_FORMAT_XSCHEMA_ERROR = _lasso.MESSAGE_FORMAT_XSCHEMA_ERROR
MESSAGE_FORMAT_ERROR = _lasso.MESSAGE_FORMAT_ERROR
MESSAGE_FORMAT_UNKNOWN = _lasso.MESSAGE_FORMAT_UNKNOWN
MESSAGE_FORMAT_XML = _lasso.MESSAGE_FORMAT_XML
MESSAGE_FORMAT_BASE64 = _lasso.MESSAGE_FORMAT_BASE64
MESSAGE_FORMAT_QUERY = _lasso.MESSAGE_FORMAT_QUERY
MESSAGE_FORMAT_SOAP = _lasso.MESSAGE_FORMAT_SOAP
SIGNATURE_TYPE_NONE = _lasso.SIGNATURE_TYPE_NONE
SIGNATURE_TYPE_SIMPLE = _lasso.SIGNATURE_TYPE_SIMPLE
SIGNATURE_TYPE_WITHX509 = _lasso.SIGNATURE_TYPE_WITHX509
SIGNATURE_TYPE_LAST = _lasso.SIGNATURE_TYPE_LAST
SIGNATURE_METHOD_NONE = _lasso.SIGNATURE_METHOD_NONE
SIGNATURE_METHOD_RSA_SHA1 = _lasso.SIGNATURE_METHOD_RSA_SHA1
SIGNATURE_METHOD_DSA_SHA1 = _lasso.SIGNATURE_METHOD_DSA_SHA1
SIGNATURE_METHOD_HMAC_SHA1 = _lasso.SIGNATURE_METHOD_HMAC_SHA1
SIGNATURE_METHOD_RSA_SHA256 = _lasso.SIGNATURE_METHOD_RSA_SHA256
SIGNATURE_METHOD_HMAC_SHA256 = _lasso.SIGNATURE_METHOD_HMAC_SHA256
SIGNATURE_METHOD_RSA_SHA384 = _lasso.SIGNATURE_METHOD_RSA_SHA384
SIGNATURE_METHOD_HMAC_SHA384 = _lasso.SIGNATURE_METHOD_HMAC_SHA384
SIGNATURE_METHOD_RSA_SHA512 = _lasso.SIGNATURE_METHOD_RSA_SHA512
SIGNATURE_METHOD_HMAC_SHA512 = _lasso.SIGNATURE_METHOD_HMAC_SHA512
SIGNATURE_METHOD_LAST = _lasso.SIGNATURE_METHOD_LAST
ENCRYPTION_SYM_KEY_TYPE_DEFAULT = _lasso.ENCRYPTION_SYM_KEY_TYPE_DEFAULT
ENCRYPTION_SYM_KEY_TYPE_AES_256 = _lasso.ENCRYPTION_SYM_KEY_TYPE_AES_256
ENCRYPTION_SYM_KEY_TYPE_AES_128 = _lasso.ENCRYPTION_SYM_KEY_TYPE_AES_128
ENCRYPTION_SYM_KEY_TYPE_3DES = _lasso.ENCRYPTION_SYM_KEY_TYPE_3DES
ENCRYTPION_SYM_KEY_TYPE_LAST = _lasso.ENCRYTPION_SYM_KEY_TYPE_LAST
DS_HREF = _lasso.DS_HREF
DS_PREFIX = _lasso.DS_PREFIX
SAML2_METADATA_HREF = _lasso.SAML2_METADATA_HREF
SAML2_METADATA_PREFIX = _lasso.SAML2_METADATA_PREFIX
SAML2_PROTOCOL_HREF = _lasso.SAML2_PROTOCOL_HREF
SAML2_PROTOCOL_PREFIX = _lasso.SAML2_PROTOCOL_PREFIX
SAML2_ASSERTION_HREF = _lasso.SAML2_ASSERTION_HREF
SAML2_ASSERTION_PREFIX = _lasso.SAML2_ASSERTION_PREFIX
SAML2_METADATA_BINDING_SOAP = _lasso.SAML2_METADATA_BINDING_SOAP
SAML2_METADATA_BINDING_REDIRECT = _lasso.SAML2_METADATA_BINDING_REDIRECT
SAML2_METADATA_BINDING_POST = _lasso.SAML2_METADATA_BINDING_POST
SAML2_METADATA_BINDING_ARTIFACT = _lasso.SAML2_METADATA_BINDING_ARTIFACT
SAML2_METADATA_BINDING_PAOS = _lasso.SAML2_METADATA_BINDING_PAOS
SAML2_METADATA_BINDING_URI = _lasso.SAML2_METADATA_BINDING_URI
SAML2_DEFLATE_ENCODING = _lasso.SAML2_DEFLATE_ENCODING
SAML2_NAME_IDENTIFIER_FORMAT_UNSPECIFIED = _lasso.SAML2_NAME_IDENTIFIER_FORMAT_UNSPECIFIED
SAML2_NAME_IDENTIFIER_FORMAT_EMAIL = _lasso.SAML2_NAME_IDENTIFIER_FORMAT_EMAIL
SAML2_NAME_IDENTIFIER_FORMAT_X509 = _lasso.SAML2_NAME_IDENTIFIER_FORMAT_X509
SAML2_NAME_IDENTIFIER_FORMAT_WINDOWS = _lasso.SAML2_NAME_IDENTIFIER_FORMAT_WINDOWS
SAML2_NAME_IDENTIFIER_FORMAT_KERBEROS = _lasso.SAML2_NAME_IDENTIFIER_FORMAT_KERBEROS
SAML2_NAME_IDENTIFIER_FORMAT_ENTITY = _lasso.SAML2_NAME_IDENTIFIER_FORMAT_ENTITY
SAML2_NAME_IDENTIFIER_FORMAT_PERSISTENT = _lasso.SAML2_NAME_IDENTIFIER_FORMAT_PERSISTENT
SAML2_NAME_IDENTIFIER_FORMAT_TRANSIENT = _lasso.SAML2_NAME_IDENTIFIER_FORMAT_TRANSIENT
SAML2_NAME_IDENTIFIER_FORMAT_ENCRYPTED = _lasso.SAML2_NAME_IDENTIFIER_FORMAT_ENCRYPTED
SAML2_ATTRIBUTE_NAME_EPR = _lasso.SAML2_ATTRIBUTE_NAME_EPR
SAML2_ATTRIBUTE_NAME_FORMAT_UNSPECIFIED = _lasso.SAML2_ATTRIBUTE_NAME_FORMAT_UNSPECIFIED
SAML2_ATTRIBUTE_NAME_FORMAT_URI = _lasso.SAML2_ATTRIBUTE_NAME_FORMAT_URI
SAML2_ATTRIBUTE_NAME_FORMAT_BASIC = _lasso.SAML2_ATTRIBUTE_NAME_FORMAT_BASIC
SAML2_ACTION_NAMESPACE_RWEDC = _lasso.SAML2_ACTION_NAMESPACE_RWEDC
SAML2_ACTION_NAMESPACE_RWEDC_NEGATION = _lasso.SAML2_ACTION_NAMESPACE_RWEDC_NEGATION
SAML2_ACTION_NAMESPACE_GHPP = _lasso.SAML2_ACTION_NAMESPACE_GHPP
SAML2_ACTION_NAMESPACE_UNIX = _lasso.SAML2_ACTION_NAMESPACE_UNIX
SAML2_ACTION_RWEDC_READ = _lasso.SAML2_ACTION_RWEDC_READ
SAML2_ACTION_RWEDC_WRITE = _lasso.SAML2_ACTION_RWEDC_WRITE
SAML2_ACTION_RWEDC_EXECUTE = _lasso.SAML2_ACTION_RWEDC_EXECUTE
SAML2_ACTION_RWEDC_DELETE = _lasso.SAML2_ACTION_RWEDC_DELETE
SAML2_ACTION_RWEDC_CONTROL = _lasso.SAML2_ACTION_RWEDC_CONTROL
SAML2_ACTION_RWEDC_NEGATION = _lasso.SAML2_ACTION_RWEDC_NEGATION
SAML2_ACTION_GHPP_GET = _lasso.SAML2_ACTION_GHPP_GET
SAML2_ACTION_GHPP_HEAD = _lasso.SAML2_ACTION_GHPP_HEAD
SAML2_ACTION_GHPP_PUT = _lasso.SAML2_ACTION_GHPP_PUT
SAML2_ACTION_GHPP_POST = _lasso.SAML2_ACTION_GHPP_POST
SAML2_CONSENT_OBTAINED = _lasso.SAML2_CONSENT_OBTAINED
SAML2_CONSENT_PRIOR = _lasso.SAML2_CONSENT_PRIOR
SAML2_CONSENT_IMPLICIT = _lasso.SAML2_CONSENT_IMPLICIT
SAML2_CONSENT_EXPLICIT = _lasso.SAML2_CONSENT_EXPLICIT
SAML2_CONSENT_UNAVAILABLE = _lasso.SAML2_CONSENT_UNAVAILABLE
SAML2_CONSENT_INAPPLICABLE = _lasso.SAML2_CONSENT_INAPPLICABLE
SAML2_STATUS_CODE_SUCCESS = _lasso.SAML2_STATUS_CODE_SUCCESS
SAML2_STATUS_CODE_REQUESTER = _lasso.SAML2_STATUS_CODE_REQUESTER
SAML2_STATUS_CODE_RESPONDER = _lasso.SAML2_STATUS_CODE_RESPONDER
SAML2_STATUS_CODE_VERSION_MISMATCH = _lasso.SAML2_STATUS_CODE_VERSION_MISMATCH
SAML2_STATUS_CODE_AUTHN_FAILED = _lasso.SAML2_STATUS_CODE_AUTHN_FAILED
SAML2_STATUS_CODE_INVALID_ATTR_NAME = _lasso.SAML2_STATUS_CODE_INVALID_ATTR_NAME
SAML2_STATUS_CODE_INVALID_NAME_ID_POLICY = _lasso.SAML2_STATUS_CODE_INVALID_NAME_ID_POLICY
SAML2_STATUS_CODE_NO_AUTHN_CONTEXT = _lasso.SAML2_STATUS_CODE_NO_AUTHN_CONTEXT
SAML2_STATUS_CODE_NO_AVAILABLE_IDP = _lasso.SAML2_STATUS_CODE_NO_AVAILABLE_IDP
SAML2_STATUS_CODE_NO_PASSIVE = _lasso.SAML2_STATUS_CODE_NO_PASSIVE
SAML2_STATUS_CODE_NO_SUPPORTED_IDP = _lasso.SAML2_STATUS_CODE_NO_SUPPORTED_IDP
SAML2_STATUS_CODE_PARTIAL_LOGOUT = _lasso.SAML2_STATUS_CODE_PARTIAL_LOGOUT
SAML2_STATUS_CODE_PROXY_COUNT_EXCEEDED = _lasso.SAML2_STATUS_CODE_PROXY_COUNT_EXCEEDED
SAML2_STATUS_CODE_REQUEST_DENIED = _lasso.SAML2_STATUS_CODE_REQUEST_DENIED
SAML2_STATUS_CODE_REQUEST_UNSUPPORTED = _lasso.SAML2_STATUS_CODE_REQUEST_UNSUPPORTED
SAML2_STATUS_CODE_REQUEST_VERSION_DEPRECATED = _lasso.SAML2_STATUS_CODE_REQUEST_VERSION_DEPRECATED
SAML2_STATUS_CODE_REQUEST_VERSION_TOO_HIGH = _lasso.SAML2_STATUS_CODE_REQUEST_VERSION_TOO_HIGH
SAML2_STATUS_CODE_REQUEST_VERSION_TOO_LOW = _lasso.SAML2_STATUS_CODE_REQUEST_VERSION_TOO_LOW
SAML2_STATUS_CODE_RESOURCE_NOT_RECOGNIZED = _lasso.SAML2_STATUS_CODE_RESOURCE_NOT_RECOGNIZED
SAML2_STATUS_CODE_TOO_MANY_RESPONSES = _lasso.SAML2_STATUS_CODE_TOO_MANY_RESPONSES
SAML2_STATUS_CODE_UNKNOWN_ATTR_PROFILE = _lasso.SAML2_STATUS_CODE_UNKNOWN_ATTR_PROFILE
SAML2_STATUS_CODE_UNKNOWN_PRINCIPAL = _lasso.SAML2_STATUS_CODE_UNKNOWN_PRINCIPAL
SAML2_STATUS_CODE_UNSUPPORTED_BINDING = _lasso.SAML2_STATUS_CODE_UNSUPPORTED_BINDING
SAML2_AUTHN_CONTEXT_AUTHENTICATED_TELEPHONY = _lasso.SAML2_AUTHN_CONTEXT_AUTHENTICATED_TELEPHONY
SAML2_AUTHN_CONTEXT_INTERNET_PROTOCOL = _lasso.SAML2_AUTHN_CONTEXT_INTERNET_PROTOCOL
SAML2_AUTHN_CONTEXT_INTERNET_PROTOCOL_PASSWORD = _lasso.SAML2_AUTHN_CONTEXT_INTERNET_PROTOCOL_PASSWORD
SAML2_AUTHN_CONTEXT_KERBEROS = _lasso.SAML2_AUTHN_CONTEXT_KERBEROS
SAML2_AUTHN_CONTEXT_MOBILE_ONE_FACTOR_CONTRACT = _lasso.SAML2_AUTHN_CONTEXT_MOBILE_ONE_FACTOR_CONTRACT
SAML2_AUTHN_CONTEXT_MOBILE_ONE_FACTOR_UNREGISTERED = _lasso.SAML2_AUTHN_CONTEXT_MOBILE_ONE_FACTOR_UNREGISTERED
SAML2_AUTHN_CONTEXT_MOBILE_TWO_FACTOR_CONTRACT = _lasso.SAML2_AUTHN_CONTEXT_MOBILE_TWO_FACTOR_CONTRACT
SAML2_AUTHN_CONTEXT_MOBILE_TWO_FACTOR_UNREGISTERED = _lasso.SAML2_AUTHN_CONTEXT_MOBILE_TWO_FACTOR_UNREGISTERED
SAML2_AUTHN_CONTEXT_NOMAD_TELEPHONY = _lasso.SAML2_AUTHN_CONTEXT_NOMAD_TELEPHONY
SAML2_AUTHN_CONTEXT_PERSONALIZED_TELEPHONY = _lasso.SAML2_AUTHN_CONTEXT_PERSONALIZED_TELEPHONY
SAML2_AUTHN_CONTEXT_PGP = _lasso.SAML2_AUTHN_CONTEXT_PGP
SAML2_AUTHN_CONTEXT_PASSWORD_PROTECTED_TRANSPORT = _lasso.SAML2_AUTHN_CONTEXT_PASSWORD_PROTECTED_TRANSPORT
SAML2_AUTHN_CONTEXT_PASSWORD = _lasso.SAML2_AUTHN_CONTEXT_PASSWORD
SAML2_AUTHN_CONTEXT_PREVIOUS_SESSION = _lasso.SAML2_AUTHN_CONTEXT_PREVIOUS_SESSION
SAML2_AUTHN_CONTEXT_SMARTCARD = _lasso.SAML2_AUTHN_CONTEXT_SMARTCARD
SAML2_AUTHN_CONTEXT_SMARTCARD_PKI = _lasso.SAML2_AUTHN_CONTEXT_SMARTCARD_PKI
SAML2_AUTHN_CONTEXT_SOFTWARE_PKI = _lasso.SAML2_AUTHN_CONTEXT_SOFTWARE_PKI
SAML2_AUTHN_CONTEXT_SPKI = _lasso.SAML2_AUTHN_CONTEXT_SPKI
SAML2_AUTHN_CONTEXT_SECURE_REMOTE_PASSWORD = _lasso.SAML2_AUTHN_CONTEXT_SECURE_REMOTE_PASSWORD
SAML2_AUTHN_CONTEXT_TLS_CLIENT = _lasso.SAML2_AUTHN_CONTEXT_TLS_CLIENT
SAML2_AUTHN_CONTEXT_X509 = _lasso.SAML2_AUTHN_CONTEXT_X509
SAML2_AUTHN_CONTEXT_TELEPHONY = _lasso.SAML2_AUTHN_CONTEXT_TELEPHONY
SAML2_AUTHN_CONTEXT_TIME_SYNC_TOKEN = _lasso.SAML2_AUTHN_CONTEXT_TIME_SYNC_TOKEN
SAML2_AUTHN_CONTEXT_XMLDSIG = _lasso.SAML2_AUTHN_CONTEXT_XMLDSIG
SAML2_AUTHN_CONTEXT_UNSPECIFIED = _lasso.SAML2_AUTHN_CONTEXT_UNSPECIFIED
SAML2_CONFIRMATION_METHOD_BEARER = _lasso.SAML2_CONFIRMATION_METHOD_BEARER
SAML2_CONFIRMATION_METHOD_HOLDER_OF_KEY = _lasso.SAML2_CONFIRMATION_METHOD_HOLDER_OF_KEY
SAML2_FIELD_ENCODING = _lasso.SAML2_FIELD_ENCODING
SAML2_FIELD_RESPONSE = _lasso.SAML2_FIELD_RESPONSE
SAML2_FIELD_REQUEST = _lasso.SAML2_FIELD_REQUEST
SAML2_FIELD_ARTIFACT = _lasso.SAML2_FIELD_ARTIFACT
SAML2_FIELD_RELAYSTATE = _lasso.SAML2_FIELD_RELAYSTATE
SAML2_FIELD_SIGNATURE = _lasso.SAML2_FIELD_SIGNATURE
SAML2_FIELD_SIGALG = _lasso.SAML2_FIELD_SIGALG
SAML2_ATTRIBUTE_PROFILE_BASIC = _lasso.SAML2_ATTRIBUTE_PROFILE_BASIC
SAML2_ATTRIBUTE_PROFILE_X500 = _lasso.SAML2_ATTRIBUTE_PROFILE_X500
SAML2_ATTRIBUTE_PROFILE_UUID = _lasso.SAML2_ATTRIBUTE_PROFILE_UUID
SAML2_ATTRIBUTE_PROFILE_DCE = _lasso.SAML2_ATTRIBUTE_PROFILE_DCE
SERVER_LOAD_METADATA_FLAG_DEFAULT = _lasso.SERVER_LOAD_METADATA_FLAG_DEFAULT
SERVER_LOAD_METADATA_FLAG_CHECK_ENTITIES_DESCRIPTOR_SIGNATURE = _lasso.SERVER_LOAD_METADATA_FLAG_CHECK_ENTITIES_DESCRIPTOR_SIGNATURE
SERVER_LOAD_METADATA_FLAG_CHECK_ENTITY_DESCRIPTOR_SIGNATURE = _lasso.SERVER_LOAD_METADATA_FLAG_CHECK_ENTITY_DESCRIPTOR_SIGNATURE
SERVER_LOAD_METADATA_FLAG_INHERIT_SIGNATURE = _lasso.SERVER_LOAD_METADATA_FLAG_INHERIT_SIGNATURE
HTTP_METHOD_NONE = _lasso.HTTP_METHOD_NONE
HTTP_METHOD_ANY = _lasso.HTTP_METHOD_ANY
HTTP_METHOD_IDP_INITIATED = _lasso.HTTP_METHOD_IDP_INITIATED
HTTP_METHOD_GET = _lasso.HTTP_METHOD_GET
HTTP_METHOD_POST = _lasso.HTTP_METHOD_POST
HTTP_METHOD_REDIRECT = _lasso.HTTP_METHOD_REDIRECT
HTTP_METHOD_SOAP = _lasso.HTTP_METHOD_SOAP
HTTP_METHOD_ARTIFACT_GET = _lasso.HTTP_METHOD_ARTIFACT_GET
HTTP_METHOD_ARTIFACT_POST = _lasso.HTTP_METHOD_ARTIFACT_POST
HTTP_METHOD_PAOS = _lasso.HTTP_METHOD_PAOS
HTTP_METHOD_LAST = _lasso.HTTP_METHOD_LAST
MD_PROTOCOL_TYPE_FEDERATION_TERMINATION = _lasso.MD_PROTOCOL_TYPE_FEDERATION_TERMINATION
MD_PROTOCOL_TYPE_NAME_IDENTIFIER_MAPPING = _lasso.MD_PROTOCOL_TYPE_NAME_IDENTIFIER_MAPPING
MD_PROTOCOL_TYPE_REGISTER_NAME_IDENTIFIER = _lasso.MD_PROTOCOL_TYPE_REGISTER_NAME_IDENTIFIER
MD_PROTOCOL_TYPE_SINGLE_LOGOUT = _lasso.MD_PROTOCOL_TYPE_SINGLE_LOGOUT
MD_PROTOCOL_TYPE_SINGLE_SIGN_ON = _lasso.MD_PROTOCOL_TYPE_SINGLE_SIGN_ON
MD_PROTOCOL_TYPE_ARTIFACT_RESOLUTION = _lasso.MD_PROTOCOL_TYPE_ARTIFACT_RESOLUTION
MD_PROTOCOL_TYPE_MANAGE_NAME_ID = _lasso.MD_PROTOCOL_TYPE_MANAGE_NAME_ID
MD_PROTOCOL_TYPE_ASSERTION_ID_REQUEST = _lasso.MD_PROTOCOL_TYPE_ASSERTION_ID_REQUEST
MD_PROTOCOL_TYPE_AUTHN_QUERY = _lasso.MD_PROTOCOL_TYPE_AUTHN_QUERY
MD_PROTOCOL_TYPE_AUTHZ = _lasso.MD_PROTOCOL_TYPE_AUTHZ
MD_PROTOCOL_TYPE_ATTRIBUTE = _lasso.MD_PROTOCOL_TYPE_ATTRIBUTE
MD_PROTOCOL_TYPE_LAST = _lasso.MD_PROTOCOL_TYPE_LAST
PROVIDER_ROLE_ANY = _lasso.PROVIDER_ROLE_ANY
PROVIDER_ROLE_NONE = _lasso.PROVIDER_ROLE_NONE
PROVIDER_ROLE_SP = _lasso.PROVIDER_ROLE_SP
PROVIDER_ROLE_IDP = _lasso.PROVIDER_ROLE_IDP
PROVIDER_ROLE_BOTH = _lasso.PROVIDER_ROLE_BOTH
PROVIDER_ROLE_AUTHN_AUTHORITY = _lasso.PROVIDER_ROLE_AUTHN_AUTHORITY
PROVIDER_ROLE_AUTHZ_AUTHORITY = _lasso.PROVIDER_ROLE_AUTHZ_AUTHORITY
PROVIDER_ROLE_ATTRIBUTE_AUTHORITY = _lasso.PROVIDER_ROLE_ATTRIBUTE_AUTHORITY
PROVIDER_ROLE_LAST = _lasso.PROVIDER_ROLE_LAST
PROVIDER_ROLE_ALL = _lasso.PROVIDER_ROLE_ALL
PROTOCOL_NONE = _lasso.PROTOCOL_NONE
PROTOCOL_LIBERTY_1_0 = _lasso.PROTOCOL_LIBERTY_1_0
PROTOCOL_LIBERTY_1_1 = _lasso.PROTOCOL_LIBERTY_1_1
PROTOCOL_LIBERTY_1_2 = _lasso.PROTOCOL_LIBERTY_1_2
PROTOCOL_SAML_2_0 = _lasso.PROTOCOL_SAML_2_0
ENCRYPTION_MODE_NONE = _lasso.ENCRYPTION_MODE_NONE
ENCRYPTION_MODE_NAMEID = _lasso.ENCRYPTION_MODE_NAMEID
ENCRYPTION_MODE_ASSERTION = _lasso.ENCRYPTION_MODE_ASSERTION
REQUEST_TYPE_INVALID = _lasso.REQUEST_TYPE_INVALID
REQUEST_TYPE_LOGIN = _lasso.REQUEST_TYPE_LOGIN
REQUEST_TYPE_LOGOUT = _lasso.REQUEST_TYPE_LOGOUT
REQUEST_TYPE_DEFEDERATION = _lasso.REQUEST_TYPE_DEFEDERATION
REQUEST_TYPE_NAME_REGISTRATION = _lasso.REQUEST_TYPE_NAME_REGISTRATION
REQUEST_TYPE_NAME_IDENTIFIER_MAPPING = _lasso.REQUEST_TYPE_NAME_IDENTIFIER_MAPPING
REQUEST_TYPE_LECP = _lasso.REQUEST_TYPE_LECP
REQUEST_TYPE_DISCO_QUERY = _lasso.REQUEST_TYPE_DISCO_QUERY
REQUEST_TYPE_DISCO_MODIFY = _lasso.REQUEST_TYPE_DISCO_MODIFY
REQUEST_TYPE_DST_QUERY = _lasso.REQUEST_TYPE_DST_QUERY
REQUEST_TYPE_DST_MODIFY = _lasso.REQUEST_TYPE_DST_MODIFY
REQUEST_TYPE_SASL_REQUEST = _lasso.REQUEST_TYPE_SASL_REQUEST
REQUEST_TYPE_NAME_ID_MANAGEMENT = _lasso.REQUEST_TYPE_NAME_ID_MANAGEMENT
REQUEST_TYPE_IDWSF2_DISCO_SVCMD_REGISTER = _lasso.REQUEST_TYPE_IDWSF2_DISCO_SVCMD_REGISTER
REQUEST_TYPE_IDWSF2_DISCO_SVCMD_ASSOCIATION_ADD = _lasso.REQUEST_TYPE_IDWSF2_DISCO_SVCMD_ASSOCIATION_ADD
REQUEST_TYPE_IDWSF2_DISCO_QUERY = _lasso.REQUEST_TYPE_IDWSF2_DISCO_QUERY
PROFILE_SIGNATURE_HINT_MAYBE = _lasso.PROFILE_SIGNATURE_HINT_MAYBE
PROFILE_SIGNATURE_HINT_FORCE = _lasso.PROFILE_SIGNATURE_HINT_FORCE
PROFILE_SIGNATURE_HINT_FORBID = _lasso.PROFILE_SIGNATURE_HINT_FORBID
PROFILE_SIGNATURE_VERIFY_HINT_MAYBE = _lasso.PROFILE_SIGNATURE_VERIFY_HINT_MAYBE
PROFILE_SIGNATURE_VERIFY_HINT_FORCE = _lasso.PROFILE_SIGNATURE_VERIFY_HINT_FORCE
PROFILE_SIGNATURE_VERIFY_HINT_IGNORE = _lasso.PROFILE_SIGNATURE_VERIFY_HINT_IGNORE
PROFILE_SIGNATURE_VERIFY_HINT_LAST = _lasso.PROFILE_SIGNATURE_VERIFY_HINT_LAST
LOGIN_PROTOCOL_PROFILE_BRWS_ART = _lasso.LOGIN_PROTOCOL_PROFILE_BRWS_ART
LOGIN_PROTOCOL_PROFILE_BRWS_POST = _lasso.LOGIN_PROTOCOL_PROFILE_BRWS_POST
LOGIN_PROTOCOL_PROFILE_BRWS_LECP = _lasso.LOGIN_PROTOCOL_PROFILE_BRWS_LECP
LOGIN_PROTOCOL_PROFILE_REDIRECT = _lasso.LOGIN_PROTOCOL_PROFILE_REDIRECT
ASSERTION_QUERY_REQUEST_TYPE_UNSET = _lasso.ASSERTION_QUERY_REQUEST_TYPE_UNSET
ASSERTION_QUERY_REQUEST_TYPE_ASSERTION_ID = _lasso.ASSERTION_QUERY_REQUEST_TYPE_ASSERTION_ID
ASSERTION_QUERY_REQUEST_TYPE_AUTHN = _lasso.ASSERTION_QUERY_REQUEST_TYPE_AUTHN
ASSERTION_QUERY_REQUEST_TYPE_ATTRIBUTE = _lasso.ASSERTION_QUERY_REQUEST_TYPE_ATTRIBUTE
ASSERTION_QUERY_REQUEST_TYPE_AUTHZ_DECISION = _lasso.ASSERTION_QUERY_REQUEST_TYPE_AUTHZ_DECISION
ASSERTION_QUERY_REQUEST_TYPE_LAST = _lasso.ASSERTION_QUERY_REQUEST_TYPE_LAST
SAML2_ASSERTION_VALID = _lasso.SAML2_ASSERTION_VALID
SAML2_ASSERTION_INVALID = _lasso.SAML2_ASSERTION_INVALID
SAML2_ASSERTION_INDETERMINATE = _lasso.SAML2_ASSERTION_INDETERMINATE
DURATION_MINUTE = _lasso.DURATION_MINUTE
DURATION_HOUR = _lasso.DURATION_HOUR
DURATION_DAY = _lasso.DURATION_DAY
DURATION_WEEK = _lasso.DURATION_WEEK
WSF_ENABLED = _lasso.WSF_ENABLED
SAML2_SUPPORT = True

class Node(object):
    def __init__(self, ):
        self._cptr = _lasso.node_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromDump(cls, dump):
         return cptrToPy(_lasso.node_new_from_dump(str2lasso(dump)))

    @classmethod
    def newFromSoap(cls, soap):
         return cptrToPy(_lasso.node_new_from_soap(str2lasso(soap)))

    @classmethod
    def newFromXmlNode(cls, node):
         return cptrToPy(_lasso.node_new_from_xmlNode(node))

    def cleanupOriginalXmlnodes(self):
        '''
        C{self}: a L{Node}
        
        Traverse the L{Node} tree starting at Node and remove keeped xmlNode
        if one is found.
        
        @return: None
        '''
        _lasso.node_cleanup_original_xmlnodes(self._cptr)

    def dump(self):
        '''
        Dumps C{self}.  All datas in object are dumped in an XML format.
        
        @return: a full XML dump of C{self}.
        '''
        return _lasso.node_dump(self._cptr)

    def exportToBase64(self):
        '''
        Exports C{self} to a base64-encoded message.
        
        @return: a base64-encoded export of C{self}.
        '''
        return _lasso.node_export_to_base64(self._cptr)

    def exportToQuery(self, sign_method = 1, private_key_file = None):
        '''
        Exports C{self} to a HTTP query string.  If C{private_key_file} is
        None, query won't be signed.
        
        @param sign_method:  the Signature transform method
        @param private_key_file:  the path to the private key (may be None)
        @return: a HTTP query export of C{self}.
        '''
        return _lasso.node_export_to_query(self._cptr, sign_method, str2lasso(private_key_file))

    def exportToQueryWithPassword(self, sign_method = 1, private_key_file = None, private_key_file_password = None):
        '''
        Exports C{self} to a HTTP query string.  If C{private_key_file} is
        None, query won't be signed.
        
        @param sign_method:  the Signature transform method
        @param private_key_file:  the path to the private key (may be None)
        @param private_key_file_password:  the password needed to decrypt the
            private key
        @return: a HTTP query export of C{self}.
        '''
        return _lasso.node_export_to_query_with_password(self._cptr, sign_method, str2lasso(private_key_file), str2lasso(private_key_file_password))

    def exportToSoap(self):
        '''
        Exports C{self} to a SOAP message.
        
        @return: a SOAP export of C{self}.
        '''
        return _lasso.node_export_to_soap(self._cptr)

    def exportToSoapWithHeaders(self, headers = None):
        '''
        Exports C{self} to a SOAP message. The C{self} becomes the SOAP body.
        each header in the #headers list is added to the SOAP header if non-
        None. C{headers} is permitted to be an empty list (e.g. None).
        
        <example> <title>Create SOAP envelope with variable number of header
        nodes</title>
        
        <para>You need to form a SOAP message with authn_request as the body
        and paos_request, ecp_request and ecp_relaystate as SOAP header
        elements. It is possible one or more of these may be None and should
        be skipped.</para> <programlisting> char *text = None; LassoNode
        *paos_request = None; LassoNode *ecp_request = None; LassoNode
        *ecp_relaystate = None; GList *headers = None;
        
        paos_request = lasso_paos_request_new(responseConsumerURL,
        message_id); ecp_request = lasso_ecp_request_new(issuer, is_passive,
        provider_name, idp_list);
        
        lasso_list_add_new_gobject(headers, paos_request);
        lasso_list_add_new_gobject(headers, ecp_request);
        lasso_list_add_new_gobject(headers, ecp_relaystate);
        
        text = lasso_node_export_to_soap_with_headers(node, headers);
        
        lasso_release_list_of_gobjects(headers); </programlisting> </example>
        
        @param headers:  #GList of #LassNode
        @return: a SOAP export of C{self}.
        '''
        return _lasso.node_export_to_soap_with_headers(self._cptr, headers)

    def exportToXml(self):
        '''
        Exports C{self} to an xml message.
        
        @return: an xml export of C{self}.
        '''
        return _lasso.node_export_to_xml(self._cptr)

    def exportToPaosRequest(self, issuer, responseConsumerURL, relay_state):
        '''
        Exports C{self} to a PAOS message.
        
        Deprecated, use lasso_node_export_to_paos_request_full() instead
        
        @return: a PAOS export of C{self}.
        '''
        return _lasso.node_export_to_paos_request(self._cptr, str2lasso(issuer), str2lasso(responseConsumerURL), str2lasso(relay_state))

    def exportToPaosRequestFull(self, issuer, responseConsumerURL, message_id, relay_state, is_passive, provider_name = None, idp_list = None):
        '''
        Creates a new SOAP message. The SOAP headers include a PaosRequst, a
        EcpRequest and optionally a EcpRelayState. The SOAP body contains the
        C{self} parameters.
        
        Returns: string containing a PAOS request. The string must be freed by
        the caller.
        
        
        
        
        
        
        
        '''
        return _lasso.node_export_to_paos_request_full(self._cptr, str2lasso(issuer), str2lasso(responseConsumerURL), str2lasso(message_id), str2lasso(relay_state), is_passive, str2lasso(provider_name), idp_list and idp_list._cptr)

    def exportToEcpSoapResponse(self, assertionConsumerURL):
        '''
        Exports C{self} to a ECP SOAP message.
        
        @return: a ECP SOAP export of C{self}.
        '''
        return _lasso.node_export_to_ecp_soap_response(self._cptr, str2lasso(assertionConsumerURL))

    def getXmlNode(self, lasso_dump):
        '''
        Builds an XML representation of C{self}.
        
        @param lasso_dump:  whether to include lasso-specific nodes
        @return: a new xmlNode.
        '''
        return _lasso.node_get_xmlNode(self._cptr, lasso_dump)

    def getOriginalXmlnode(self):
        '''
        Retrieve the original xmlNode eventually associated to this L{Node}.
        
        @return: an #xmlNodePtr or None.
        '''
        return _lasso.node_get_original_xmlnode(self._cptr)

    def setOriginalXmlnode(self, xmlnode):
        '''
        Set the underlying XML representation of the object.
        
        @param xmlnode:  an #xmlNode
        '''
        _lasso.node_set_original_xmlnode(self._cptr, xmlnode)

    def setCustomNamespace(self, prefix, href):
        '''
        Set a custom namespace for an object instance, use it with object
        existing a lot of revision of the nearly same namespace.
        
        @param prefix:  the prefix to use for the definition
        @param href:  the URI of the namespace
        '''
        _lasso.node_set_custom_namespace(self._cptr, str2lasso(prefix), str2lasso(href))

    def setCustomNodename(self, nodename):
        '''
        Set a custom nodename for an object instance, use it with object
        implement a schema type and not a real element.
        
        @param nodename:  the name to use for the node
        '''
        _lasso.node_set_custom_nodename(self._cptr, str2lasso(nodename))

    def getName(self):
        '''
        Return the XML element name for this object, the one that would be
        used in the XML dump of this object.
        
        @return: the name of the object, the value must not be stored.
        '''
        return _lasso.node_get_name(self._cptr)

    def getNamespace(self):
        return _lasso.node_get_namespace(self._cptr)

    def initFromMessage(self, message):
        '''
        Parses C{message} and initialiazes C{self} fields with data from it.
        Message type may be base64, SOAP, XML or query string, correct type is
        found automatically.
        
        @param message:  a Liberty message
        @return: a L{MessageFormat} value.
        '''
        return _lasso.node_init_from_message(self._cptr, str2lasso(message))

    def initFromQuery(self, query):
        '''
        Initialiazes C{self} fields with data from C{query} string.
        
        @param query:  the query string
        @return: True if success
        '''
        return _lasso.node_init_from_query(self._cptr, str2lasso(query))

    def initFromXml(self, xmlnode):
        '''
        Initialiazes C{self} fields with data from C{xmlnode} XML node.
        
        @param xmlnode:  the libxml2 node
        '''
        rc = _lasso.node_init_from_xml(self._cptr, xmlnode)
        Error.raise_on_rc(rc)

    def debug(self, level = 10):
        '''
        Create a debug dump for C{self}, it is pretty printed so any contained
        signature will be uncheckable.
        
        @param level:  the indentation depth, i.e. the depth of the last nodes
            to be indented.
        @return: a full indented and so human readable dump of C{self}.
        '''
        return _lasso.node_debug(self._cptr, level)

    originalXmlnode = property(getOriginalXmlnode, setOriginalXmlnode)
    name = property(getName)
    namespace = property(getNamespace)

class Key(Node):
    @classmethod
    def newForSignatureFromBase64String(cls, base64_string, password, signature_method, certificate):
         return cptrToPy(_lasso.key_new_for_signature_from_base64_string(str2lasso(base64_string), str2lasso(password), signature_method, str2lasso(certificate)))

    @classmethod
    def newForSignatureFromFile(cls, filename_or_buffer, password, signature_method, certificate):
         return cptrToPy(_lasso.key_new_for_signature_from_file(str2lasso(filename_or_buffer), str2lasso(password), signature_method, str2lasso(certificate)))

    def queryVerify(self, query):
        '''
        query: a raw HTTP query string
        
        Sign the given query string using the given key.
        
        @return: the signed query string.
        '''
        rc = _lasso.key_query_verify(self._cptr, str2lasso(query))
        Error.raise_on_rc(rc)

    def querySign(self, query):
        return _lasso.key_query_sign(self._cptr, str2lasso(query))

    def saml2XmlVerify(self, id, document):
        '''
        Verify the first signature node child of the node with the given id.
        It follows from the profile of XMLDsig used by the SAML 2.0
        specification.
        
        @param id:  the value of the ID attribute of signed node
        @param document:  the document containing the signed node
        @return: 0 if the signature validate, an error code otherwise.
        '''
        rc = _lasso.key_saml2_xml_verify(self._cptr, str2lasso(id), document)
        Error.raise_on_rc(rc)

    def saml2XmlSign(self, id, document):
        '''
        Sign the first signature node child of the node with the given id. It
        no signature node is found a new one is added at the end of the
        children list of the signed node.
        
        The passed document node is modified in-place.
        
        @param id:  the value of the ID attribute of signed node
        @param document:  the document containing the signed node
        @return: The modified xmlNode object, or None if the signature failed.
        '''
        return _lasso.key_saml2_xml_sign(self._cptr, str2lasso(id), document)


class SamlSubjectLocality(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml_subject_locality_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_ipAddress(self):
        t = _lasso.SamlSubjectLocality_ipAddress_get(self._cptr)
        return t;
    def set_ipAddress(self, value):
        value = str2lasso(value)
        _lasso.SamlSubjectLocality_ipAddress_set(self._cptr, value)
    ipAddress = property(get_ipAddress, set_ipAddress)
    iPAddress = ipAddress

    def get_dnsAddress(self):
        t = _lasso.SamlSubjectLocality_dnsAddress_get(self._cptr)
        return t;
    def set_dnsAddress(self, value):
        value = str2lasso(value)
        _lasso.SamlSubjectLocality_dnsAddress_set(self._cptr, value)
    dnsAddress = property(get_dnsAddress, set_dnsAddress)
    dNSAddress = dnsAddress


class LibAuthnContext(Node):
    def __init__(self, ):
        self._cptr = _lasso.lib_authn_context_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_authnContextClassRef(self):
        t = _lasso.LibAuthnContext_authnContextClassRef_get(self._cptr)
        return t;
    def set_authnContextClassRef(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnContext_authnContextClassRef_set(self._cptr, value)
    authnContextClassRef = property(get_authnContextClassRef, set_authnContextClassRef)

    def get_authnContextStatementRef(self):
        t = _lasso.LibAuthnContext_authnContextStatementRef_get(self._cptr)
        return t;
    def set_authnContextStatementRef(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnContext_authnContextStatementRef_set(self._cptr, value)
    authnContextStatementRef = property(get_authnContextStatementRef, set_authnContextStatementRef)


class LibIDPList(Node):
    def __init__(self, ):
        self._cptr = _lasso.lib_idp_list_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_idpEntries(self):
        t = _lasso.LibIDPList_idpEntries_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_idpEntries(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibIDPList_idpEntries_set(self._cptr, value)
    idpEntries = property(get_idpEntries, set_idpEntries)
    iDPEntries = idpEntries

    def get_getComplete(self):
        t = _lasso.LibIDPList_getComplete_get(self._cptr)
        return t;
    def set_getComplete(self, value):
        value = str2lasso(value)
        _lasso.LibIDPList_getComplete_set(self._cptr, value)
    getComplete = property(get_getComplete, set_getComplete)


class LibAuthnResponseEnvelope(Node):
    def __init__(self, response, assertionConsumerServiceURL):
        self._cptr = _lasso.lib_authn_response_envelope_new(response and response._cptr, str2lasso(assertionConsumerServiceURL))
        if self._cptr is None:
            raise Error('failed to create object')

    def get_extension(self):
        t = _lasso.LibAuthnResponseEnvelope_extension_get(self._cptr)
        return t;
    def set_extension(self, value):
        _lasso.LibAuthnResponseEnvelope_extension_set(self._cptr, value)
    extension = property(get_extension, set_extension)

    def get_authnResponse(self):
        t = _lasso.LibAuthnResponseEnvelope_authnResponse_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_authnResponse(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibAuthnResponseEnvelope_authnResponse_set(self._cptr, value)
    authnResponse = property(get_authnResponse, set_authnResponse)

    def get_assertionConsumerServiceUrl(self):
        t = _lasso.LibAuthnResponseEnvelope_assertionConsumerServiceUrl_get(self._cptr)
        return t;
    def set_assertionConsumerServiceUrl(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnResponseEnvelope_assertionConsumerServiceUrl_set(self._cptr, value)
    assertionConsumerServiceUrl = property(get_assertionConsumerServiceUrl, set_assertionConsumerServiceUrl)
    assertionConsumerServiceURL = assertionConsumerServiceUrl


class LibRequestAuthnContext(Node):
    def __init__(self, ):
        self._cptr = _lasso.lib_request_authn_context_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_authnContextClassRef(self):
        t = _lasso.LibRequestAuthnContext_authnContextClassRef_get(self._cptr)
        return t;
    def set_authnContextClassRef(self, value):
        _lasso.LibRequestAuthnContext_authnContextClassRef_set(self._cptr, value)
    authnContextClassRef = property(get_authnContextClassRef, set_authnContextClassRef)

    def get_authnContextStatementRef(self):
        t = _lasso.LibRequestAuthnContext_authnContextStatementRef_get(self._cptr)
        return t;
    def set_authnContextStatementRef(self, value):
        _lasso.LibRequestAuthnContext_authnContextStatementRef_set(self._cptr, value)
    authnContextStatementRef = property(get_authnContextStatementRef, set_authnContextStatementRef)

    def get_authnContextComparison(self):
        t = _lasso.LibRequestAuthnContext_authnContextComparison_get(self._cptr)
        return t;
    def set_authnContextComparison(self, value):
        value = str2lasso(value)
        _lasso.LibRequestAuthnContext_authnContextComparison_set(self._cptr, value)
    authnContextComparison = property(get_authnContextComparison, set_authnContextComparison)


class SamlpStatusCode(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp_status_code_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_statusCode(self):
        t = _lasso.SamlpStatusCode_statusCode_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_statusCode(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlpStatusCode_statusCode_set(self._cptr, value)
    statusCode = property(get_statusCode, set_statusCode)

    def get_value(self):
        t = _lasso.SamlpStatusCode_value_get(self._cptr)
        return t;
    def set_value(self, value):
        value = str2lasso(value)
        _lasso.SamlpStatusCode_value_set(self._cptr, value)
    value = property(get_value, set_value)


class SamlConditions(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml_conditions_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_condition(self):
        t = _lasso.SamlConditions_condition_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_condition(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.SamlConditions_condition_set(self._cptr, value)
    condition = property(get_condition, set_condition)

    def get_audienceRestrictionCondition(self):
        t = _lasso.SamlConditions_audienceRestrictionCondition_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_audienceRestrictionCondition(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.SamlConditions_audienceRestrictionCondition_set(self._cptr, value)
    audienceRestrictionCondition = property(get_audienceRestrictionCondition, set_audienceRestrictionCondition)

    def get_notBefore(self):
        t = _lasso.SamlConditions_notBefore_get(self._cptr)
        return t;
    def set_notBefore(self, value):
        value = str2lasso(value)
        _lasso.SamlConditions_notBefore_set(self._cptr, value)
    notBefore = property(get_notBefore, set_notBefore)

    def get_notOnOrAfter(self):
        t = _lasso.SamlConditions_notOnOrAfter_get(self._cptr)
        return t;
    def set_notOnOrAfter(self, value):
        value = str2lasso(value)
        _lasso.SamlConditions_notOnOrAfter_set(self._cptr, value)
    notOnOrAfter = property(get_notOnOrAfter, set_notOnOrAfter)


class SamlAttributeDesignator(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml_attribute_designator_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_attributeName(self):
        t = _lasso.SamlAttributeDesignator_attributeName_get(self._cptr)
        return t;
    def set_attributeName(self, value):
        value = str2lasso(value)
        _lasso.SamlAttributeDesignator_attributeName_set(self._cptr, value)
    attributeName = property(get_attributeName, set_attributeName)

    def get_attributeNamespace(self):
        t = _lasso.SamlAttributeDesignator_attributeNamespace_get(self._cptr)
        return t;
    def set_attributeNamespace(self, value):
        value = str2lasso(value)
        _lasso.SamlAttributeDesignator_attributeNamespace_set(self._cptr, value)
    attributeNamespace = property(get_attributeNamespace, set_attributeNamespace)


class SamlAttribute(SamlAttributeDesignator):
    def __init__(self, ):
        self._cptr = _lasso.saml_attribute_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_attributeName(self):
        t = _lasso.SamlAttribute_attributeName_get(self._cptr)
        return t;
    def set_attributeName(self, value):
        value = str2lasso(value)
        _lasso.SamlAttribute_attributeName_set(self._cptr, value)
    attributeName = property(get_attributeName, set_attributeName)

    def get_attributeNameSpace(self):
        t = _lasso.SamlAttribute_attributeNameSpace_get(self._cptr)
        return t;
    def set_attributeNameSpace(self, value):
        value = str2lasso(value)
        _lasso.SamlAttribute_attributeNameSpace_set(self._cptr, value)
    attributeNameSpace = property(get_attributeNameSpace, set_attributeNameSpace)

    def get_attributeValue(self):
        t = _lasso.SamlAttribute_attributeValue_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_attributeValue(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.SamlAttribute_attributeValue_set(self._cptr, value)
    attributeValue = property(get_attributeValue, set_attributeValue)


class SamlSubject(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml_subject_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_nameIdentifier(self):
        t = _lasso.SamlSubject_nameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlSubject_nameIdentifier_set(self._cptr, value)
    nameIdentifier = property(get_nameIdentifier, set_nameIdentifier)

    def get_subjectConfirmation(self):
        t = _lasso.SamlSubject_subjectConfirmation_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_subjectConfirmation(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlSubject_subjectConfirmation_set(self._cptr, value)
    subjectConfirmation = property(get_subjectConfirmation, set_subjectConfirmation)

    def get_encryptedNameIdentifier(self):
        t = _lasso.SamlSubject_encryptedNameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_encryptedNameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlSubject_encryptedNameIdentifier_set(self._cptr, value)
    encryptedNameIdentifier = property(get_encryptedNameIdentifier, set_encryptedNameIdentifier)


class SamlpRequestAbstract(Node):
    def get_respondWith(self):
        t = _lasso.SamlpRequestAbstract_respondWith_get(self._cptr)
        return t;
    def set_respondWith(self, value):
        _lasso.SamlpRequestAbstract_respondWith_set(self._cptr, value)
    respondWith = property(get_respondWith, set_respondWith)

    def get_requestId(self):
        t = _lasso.SamlpRequestAbstract_requestId_get(self._cptr)
        return t;
    def set_requestId(self, value):
        value = str2lasso(value)
        _lasso.SamlpRequestAbstract_requestId_set(self._cptr, value)
    requestId = property(get_requestId, set_requestId)

    def get_majorVersion(self):
        t = _lasso.SamlpRequestAbstract_majorVersion_get(self._cptr)
        return t;
    def set_majorVersion(self, value):
        _lasso.SamlpRequestAbstract_majorVersion_set(self._cptr, value)
    majorVersion = property(get_majorVersion, set_majorVersion)

    def get_minorVersion(self):
        t = _lasso.SamlpRequestAbstract_minorVersion_get(self._cptr)
        return t;
    def set_minorVersion(self, value):
        _lasso.SamlpRequestAbstract_minorVersion_set(self._cptr, value)
    minorVersion = property(get_minorVersion, set_minorVersion)

    def get_issueInstant(self):
        t = _lasso.SamlpRequestAbstract_issueInstant_get(self._cptr)
        return t;
    def set_issueInstant(self, value):
        value = str2lasso(value)
        _lasso.SamlpRequestAbstract_issueInstant_set(self._cptr, value)
    issueInstant = property(get_issueInstant, set_issueInstant)

    def get_signType(self):
        t = _lasso.SamlpRequestAbstract_signType_get(self._cptr)
        return t;
    def set_signType(self, value):
        _lasso.SamlpRequestAbstract_signType_set(self._cptr, value)
    signType = property(get_signType, set_signType)

    def get_signMethod(self):
        t = _lasso.SamlpRequestAbstract_signMethod_get(self._cptr)
        return t;
    def set_signMethod(self, value):
        _lasso.SamlpRequestAbstract_signMethod_set(self._cptr, value)
    signMethod = property(get_signMethod, set_signMethod)

    def get_privateKeyFile(self):
        t = _lasso.SamlpRequestAbstract_privateKeyFile_get(self._cptr)
        return t;
    def set_privateKeyFile(self, value):
        value = str2lasso(value)
        _lasso.SamlpRequestAbstract_privateKeyFile_set(self._cptr, value)
    privateKeyFile = property(get_privateKeyFile, set_privateKeyFile)

    def get_certificateFile(self):
        t = _lasso.SamlpRequestAbstract_certificateFile_get(self._cptr)
        return t;
    def set_certificateFile(self, value):
        value = str2lasso(value)
        _lasso.SamlpRequestAbstract_certificateFile_set(self._cptr, value)
    certificateFile = property(get_certificateFile, set_certificateFile)


class LibAuthnRequest(SamlpRequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.lib_authn_request_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_extension(self):
        t = _lasso.LibAuthnRequest_extension_get(self._cptr)
        return t;
    def set_extension(self, value):
        _lasso.LibAuthnRequest_extension_set(self._cptr, value)
    extension = property(get_extension, set_extension)

    def get_providerId(self):
        t = _lasso.LibAuthnRequest_providerId_get(self._cptr)
        return t;
    def set_providerId(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnRequest_providerId_set(self._cptr, value)
    providerId = property(get_providerId, set_providerId)

    def get_affiliationId(self):
        t = _lasso.LibAuthnRequest_affiliationId_get(self._cptr)
        return t;
    def set_affiliationId(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnRequest_affiliationId_set(self._cptr, value)
    affiliationId = property(get_affiliationId, set_affiliationId)

    def get_nameIdPolicy(self):
        t = _lasso.LibAuthnRequest_nameIdPolicy_get(self._cptr)
        return t;
    def set_nameIdPolicy(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnRequest_nameIdPolicy_set(self._cptr, value)
    nameIdPolicy = property(get_nameIdPolicy, set_nameIdPolicy)

    def get_forceAuthn(self):
        t = _lasso.LibAuthnRequest_forceAuthn_get(self._cptr)
        return t;
    def set_forceAuthn(self, value):
        _lasso.LibAuthnRequest_forceAuthn_set(self._cptr, value)
    forceAuthn = property(get_forceAuthn, set_forceAuthn)

    def get_isPassive(self):
        t = _lasso.LibAuthnRequest_isPassive_get(self._cptr)
        return t;
    def set_isPassive(self, value):
        _lasso.LibAuthnRequest_isPassive_set(self._cptr, value)
    isPassive = property(get_isPassive, set_isPassive)

    def get_protocolProfile(self):
        t = _lasso.LibAuthnRequest_protocolProfile_get(self._cptr)
        return t;
    def set_protocolProfile(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnRequest_protocolProfile_set(self._cptr, value)
    protocolProfile = property(get_protocolProfile, set_protocolProfile)

    def get_assertionConsumerServiceId(self):
        t = _lasso.LibAuthnRequest_assertionConsumerServiceId_get(self._cptr)
        return t;
    def set_assertionConsumerServiceId(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnRequest_assertionConsumerServiceId_set(self._cptr, value)
    assertionConsumerServiceId = property(get_assertionConsumerServiceId, set_assertionConsumerServiceId)

    def get_requestAuthnContext(self):
        t = _lasso.LibAuthnRequest_requestAuthnContext_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_requestAuthnContext(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibAuthnRequest_requestAuthnContext_set(self._cptr, value)
    requestAuthnContext = property(get_requestAuthnContext, set_requestAuthnContext)

    def get_relayState(self):
        t = _lasso.LibAuthnRequest_relayState_get(self._cptr)
        return t;
    def set_relayState(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnRequest_relayState_set(self._cptr, value)
    relayState = property(get_relayState, set_relayState)

    def get_scoping(self):
        t = _lasso.LibAuthnRequest_scoping_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_scoping(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibAuthnRequest_scoping_set(self._cptr, value)
    scoping = property(get_scoping, set_scoping)

    def get_consent(self):
        t = _lasso.LibAuthnRequest_consent_get(self._cptr)
        return t;
    def set_consent(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnRequest_consent_set(self._cptr, value)
    consent = property(get_consent, set_consent)


class SamlSubjectConfirmation(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml_subject_confirmation_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_confirmationMethod(self):
        t = _lasso.SamlSubjectConfirmation_confirmationMethod_get(self._cptr)
        return t;
    def set_confirmationMethod(self, value):
        _lasso.SamlSubjectConfirmation_confirmationMethod_set(self._cptr, value)
    confirmationMethod = property(get_confirmationMethod, set_confirmationMethod)

    def get_subjectConfirmationData(self):
        t = _lasso.SamlSubjectConfirmation_subjectConfirmationData_get(self._cptr)
        return t;
    def set_subjectConfirmationData(self, value):
        value = str2lasso(value)
        _lasso.SamlSubjectConfirmation_subjectConfirmationData_set(self._cptr, value)
    subjectConfirmationData = property(get_subjectConfirmationData, set_subjectConfirmationData)

    def get_keyInfo(self):
        t = _lasso.SamlSubjectConfirmation_keyInfo_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_keyInfo(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlSubjectConfirmation_keyInfo_set(self._cptr, value)
    keyInfo = property(get_keyInfo, set_keyInfo)


class SamlAdvice(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml_advice_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_assertionIdReference(self):
        t = _lasso.SamlAdvice_assertionIdReference_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_assertionIdReference(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.SamlAdvice_assertionIdReference_set(self._cptr, value)
    assertionIdReference = property(get_assertionIdReference, set_assertionIdReference)

    def get_assertion(self):
        t = _lasso.SamlAdvice_assertion_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_assertion(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlAdvice_assertion_set(self._cptr, value)
    assertion = property(get_assertion, set_assertion)


class SamlConditionAbstract(Node):
    pass

class SamlAudienceRestrictionCondition(SamlConditionAbstract):
    def __init__(self, ):
        self._cptr = _lasso.saml_audience_restriction_condition_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFull(cls, audience):
         return cptrToPy(_lasso.saml_audience_restriction_condition_new_full(str2lasso(audience)))

    def get_audience(self):
        t = _lasso.SamlAudienceRestrictionCondition_audience_get(self._cptr)
        return t;
    def set_audience(self, value):
        _lasso.SamlAudienceRestrictionCondition_audience_set(self._cptr, value)
    audience = property(get_audience, set_audience)


class LibScoping(Node):
    def __init__(self, ):
        self._cptr = _lasso.lib_scoping_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_proxyCount(self):
        t = _lasso.LibScoping_proxyCount_get(self._cptr)
        return t;
    def set_proxyCount(self, value):
        _lasso.LibScoping_proxyCount_set(self._cptr, value)
    proxyCount = property(get_proxyCount, set_proxyCount)

    def get_idpList(self):
        t = _lasso.LibScoping_idpList_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_idpList(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibScoping_idpList_set(self._cptr, value)
    idpList = property(get_idpList, set_idpList)
    iDPList = idpList


class PaosRequest(Node):
    def __init__(self, responseConsumerURL = None, messageID = None):
        self._cptr = _lasso.paos_request_new(str2lasso(responseConsumerURL), str2lasso(messageID))
        if self._cptr is None:
            raise Error('failed to create object')

    def get_responseConsumerURL(self):
        t = _lasso.PaosRequest_responseConsumerURL_get(self._cptr)
        return t;
    def set_responseConsumerURL(self, value):
        value = str2lasso(value)
        _lasso.PaosRequest_responseConsumerURL_set(self._cptr, value)
    responseConsumerURL = property(get_responseConsumerURL, set_responseConsumerURL)

    def get_messageId(self):
        t = _lasso.PaosRequest_messageId_get(self._cptr)
        return t;
    def set_messageId(self, value):
        value = str2lasso(value)
        _lasso.PaosRequest_messageId_set(self._cptr, value)
    messageId = property(get_messageId, set_messageId)

    def get_service(self):
        t = _lasso.PaosRequest_service_get(self._cptr)
        return t;
    def set_service(self, value):
        value = str2lasso(value)
        _lasso.PaosRequest_service_set(self._cptr, value)
    service = property(get_service, set_service)

    def get_mustUnderstand(self):
        t = _lasso.PaosRequest_mustUnderstand_get(self._cptr)
        return t;
    def set_mustUnderstand(self, value):
        _lasso.PaosRequest_mustUnderstand_set(self._cptr, value)
    mustUnderstand = property(get_mustUnderstand, set_mustUnderstand)

    def get_actor(self):
        t = _lasso.PaosRequest_actor_get(self._cptr)
        return t;
    def set_actor(self, value):
        value = str2lasso(value)
        _lasso.PaosRequest_actor_set(self._cptr, value)
    actor = property(get_actor, set_actor)

    def validate(self):
        '''
        Validates the object conforms to required values.
        
         - <listitem>responseConsumerURL must be non-None</listitem>
           <listitem>mustUnderstand must be TRUE</listitem>   <listitem>actor
           must be equal to #LASSO_SOAP_ENV_ACTOR</listitem>
           <listitem>service must be equal to #LASSO_ECP_HREF</listitem>
        
        Returns: 0 on success, error code otherwise
        '''
        return _lasso.paos_request_validate(self._cptr)


class SamlAssertion(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml_assertion_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_conditions(self):
        t = _lasso.SamlAssertion_conditions_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_conditions(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlAssertion_conditions_set(self._cptr, value)
    conditions = property(get_conditions, set_conditions)

    def get_advice(self):
        t = _lasso.SamlAssertion_advice_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_advice(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlAssertion_advice_set(self._cptr, value)
    advice = property(get_advice, set_advice)

    def get_subjectStatement(self):
        t = _lasso.SamlAssertion_subjectStatement_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_subjectStatement(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlAssertion_subjectStatement_set(self._cptr, value)
    subjectStatement = property(get_subjectStatement, set_subjectStatement)

    def get_authenticationStatement(self):
        t = _lasso.SamlAssertion_authenticationStatement_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_authenticationStatement(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlAssertion_authenticationStatement_set(self._cptr, value)
    authenticationStatement = property(get_authenticationStatement, set_authenticationStatement)

    def get_attributeStatement(self):
        t = _lasso.SamlAssertion_attributeStatement_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_attributeStatement(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlAssertion_attributeStatement_set(self._cptr, value)
    attributeStatement = property(get_attributeStatement, set_attributeStatement)

    def get_majorVersion(self):
        t = _lasso.SamlAssertion_majorVersion_get(self._cptr)
        return t;
    def set_majorVersion(self, value):
        _lasso.SamlAssertion_majorVersion_set(self._cptr, value)
    majorVersion = property(get_majorVersion, set_majorVersion)

    def get_minorVersion(self):
        t = _lasso.SamlAssertion_minorVersion_get(self._cptr)
        return t;
    def set_minorVersion(self, value):
        _lasso.SamlAssertion_minorVersion_set(self._cptr, value)
    minorVersion = property(get_minorVersion, set_minorVersion)

    def get_assertionId(self):
        t = _lasso.SamlAssertion_assertionId_get(self._cptr)
        return t;
    def set_assertionId(self, value):
        value = str2lasso(value)
        _lasso.SamlAssertion_assertionId_set(self._cptr, value)
    assertionId = property(get_assertionId, set_assertionId)

    def get_issuer(self):
        t = _lasso.SamlAssertion_issuer_get(self._cptr)
        return t;
    def set_issuer(self, value):
        value = str2lasso(value)
        _lasso.SamlAssertion_issuer_set(self._cptr, value)
    issuer = property(get_issuer, set_issuer)

    def get_issueInstant(self):
        t = _lasso.SamlAssertion_issueInstant_get(self._cptr)
        return t;
    def set_issueInstant(self, value):
        value = str2lasso(value)
        _lasso.SamlAssertion_issueInstant_set(self._cptr, value)
    issueInstant = property(get_issueInstant, set_issueInstant)

    def get_signType(self):
        t = _lasso.SamlAssertion_signType_get(self._cptr)
        return t;
    def set_signType(self, value):
        _lasso.SamlAssertion_signType_set(self._cptr, value)
    signType = property(get_signType, set_signType)

    def get_signMethod(self):
        t = _lasso.SamlAssertion_signMethod_get(self._cptr)
        return t;
    def set_signMethod(self, value):
        _lasso.SamlAssertion_signMethod_set(self._cptr, value)
    signMethod = property(get_signMethod, set_signMethod)

    def get_privateKeyFile(self):
        t = _lasso.SamlAssertion_privateKeyFile_get(self._cptr)
        return t;
    def set_privateKeyFile(self, value):
        value = str2lasso(value)
        _lasso.SamlAssertion_privateKeyFile_set(self._cptr, value)
    privateKeyFile = property(get_privateKeyFile, set_privateKeyFile)

    def get_certificateFile(self):
        t = _lasso.SamlAssertion_certificateFile_get(self._cptr)
        return t;
    def set_certificateFile(self, value):
        value = str2lasso(value)
        _lasso.SamlAssertion_certificateFile_set(self._cptr, value)
    certificateFile = property(get_certificateFile, set_certificateFile)


class LibAssertion(SamlAssertion):
    def __init__(self, ):
        self._cptr = _lasso.lib_assertion_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFull(cls, issuer, requestID, audience, notBefore, notOnOrAfter):
         return cptrToPy(_lasso.lib_assertion_new_full(str2lasso(issuer), str2lasso(requestID), str2lasso(audience), str2lasso(notBefore), str2lasso(notOnOrAfter)))

    def get_inResponseTo(self):
        t = _lasso.LibAssertion_inResponseTo_get(self._cptr)
        return t;
    def set_inResponseTo(self, value):
        value = str2lasso(value)
        _lasso.LibAssertion_inResponseTo_set(self._cptr, value)
    inResponseTo = property(get_inResponseTo, set_inResponseTo)


class LibNameIdentifierMappingRequest(SamlpRequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.lib_name_identifier_mapping_request_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFull(cls, providerID, nameIdentifier, targetNamespace, sign_type, sign_method):
         return cptrToPy(_lasso.lib_name_identifier_mapping_request_new_full(str2lasso(providerID), nameIdentifier and nameIdentifier._cptr, str2lasso(targetNamespace), sign_type, sign_method))

    def get_extension(self):
        t = _lasso.LibNameIdentifierMappingRequest_extension_get(self._cptr)
        return t;
    def set_extension(self, value):
        _lasso.LibNameIdentifierMappingRequest_extension_set(self._cptr, value)
    extension = property(get_extension, set_extension)

    def get_providerId(self):
        t = _lasso.LibNameIdentifierMappingRequest_providerId_get(self._cptr)
        return t;
    def set_providerId(self, value):
        value = str2lasso(value)
        _lasso.LibNameIdentifierMappingRequest_providerId_set(self._cptr, value)
    providerId = property(get_providerId, set_providerId)

    def get_nameIdentifier(self):
        t = _lasso.LibNameIdentifierMappingRequest_nameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibNameIdentifierMappingRequest_nameIdentifier_set(self._cptr, value)
    nameIdentifier = property(get_nameIdentifier, set_nameIdentifier)

    def get_targetNamespace(self):
        t = _lasso.LibNameIdentifierMappingRequest_targetNamespace_get(self._cptr)
        return t;
    def set_targetNamespace(self, value):
        value = str2lasso(value)
        _lasso.LibNameIdentifierMappingRequest_targetNamespace_set(self._cptr, value)
    targetNamespace = property(get_targetNamespace, set_targetNamespace)

    def get_consent(self):
        t = _lasso.LibNameIdentifierMappingRequest_consent_get(self._cptr)
        return t;
    def set_consent(self, value):
        value = str2lasso(value)
        _lasso.LibNameIdentifierMappingRequest_consent_set(self._cptr, value)
    consent = property(get_consent, set_consent)


class SamlStatementAbstract(Node):
    pass

class SamlSubjectStatementAbstract(SamlStatementAbstract):
    def get_subject(self):
        t = _lasso.SamlSubjectStatementAbstract_subject_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_subject(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlSubjectStatementAbstract_subject_set(self._cptr, value)
    subject = property(get_subject, set_subject)


class SamlSubjectStatement(SamlSubjectStatementAbstract):
    def __init__(self, ):
        self._cptr = _lasso.saml_subject_statement_new()
        if self._cptr is None:
            raise Error('failed to create object')


class SamlAttributeStatement(SamlSubjectStatementAbstract):
    def __init__(self, ):
        self._cptr = _lasso.saml_attribute_statement_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_attribute(self):
        t = _lasso.SamlAttributeStatement_attribute_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_attribute(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.SamlAttributeStatement_attribute_set(self._cptr, value)
    attribute = property(get_attribute, set_attribute)


class SamlpRequest(SamlpRequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.samlp_request_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_assertionArtifact(self):
        t = _lasso.SamlpRequest_assertionArtifact_get(self._cptr)
        return t;
    def set_assertionArtifact(self, value):
        value = str2lasso(value)
        _lasso.SamlpRequest_assertionArtifact_set(self._cptr, value)
    assertionArtifact = property(get_assertionArtifact, set_assertionArtifact)


class LibLogoutRequest(SamlpRequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.lib_logout_request_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFull(cls, providerID, nameIdentifier, sign_type, sign_method):
         return cptrToPy(_lasso.lib_logout_request_new_full(str2lasso(providerID), nameIdentifier and nameIdentifier._cptr, sign_type, sign_method))

    def get_extension(self):
        t = _lasso.LibLogoutRequest_extension_get(self._cptr)
        return t;
    def set_extension(self, value):
        _lasso.LibLogoutRequest_extension_set(self._cptr, value)
    extension = property(get_extension, set_extension)

    def get_providerId(self):
        t = _lasso.LibLogoutRequest_providerId_get(self._cptr)
        return t;
    def set_providerId(self, value):
        value = str2lasso(value)
        _lasso.LibLogoutRequest_providerId_set(self._cptr, value)
    providerId = property(get_providerId, set_providerId)

    def get_nameIdentifier(self):
        t = _lasso.LibLogoutRequest_nameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibLogoutRequest_nameIdentifier_set(self._cptr, value)
    nameIdentifier = property(get_nameIdentifier, set_nameIdentifier)

    def get_sessionIndex(self):
        t = _lasso.LibLogoutRequest_sessionIndex_get(self._cptr)
        return t;
    def set_sessionIndex(self, value):
        value = str2lasso(value)
        _lasso.LibLogoutRequest_sessionIndex_set(self._cptr, value)
    sessionIndex = property(get_sessionIndex, set_sessionIndex)

    def get_relayState(self):
        t = _lasso.LibLogoutRequest_relayState_get(self._cptr)
        return t;
    def set_relayState(self, value):
        value = str2lasso(value)
        _lasso.LibLogoutRequest_relayState_set(self._cptr, value)
    relayState = property(get_relayState, set_relayState)

    def get_consent(self):
        t = _lasso.LibLogoutRequest_consent_get(self._cptr)
        return t;
    def set_consent(self, value):
        value = str2lasso(value)
        _lasso.LibLogoutRequest_consent_set(self._cptr, value)
    consent = property(get_consent, set_consent)

    def get_notOnOrAfter(self):
        t = _lasso.LibLogoutRequest_notOnOrAfter_get(self._cptr)
        return t;
    def set_notOnOrAfter(self, value):
        value = str2lasso(value)
        _lasso.LibLogoutRequest_notOnOrAfter_set(self._cptr, value)
    notOnOrAfter = property(get_notOnOrAfter, set_notOnOrAfter)

    def setSessionIndexes(self, session_indexes):
        '''
        Set the SessionIndex node for this idff:LogoutRequest.
        
        @param session_indexes:  a list of session indexes
        '''
        _lasso.lib_logout_request_set_session_indexes(self._cptr, session_indexes)

    def getSessionIndexes(self):
        '''
        Get the SessionIndex node for this idff:LogoutRequest.
        
        @return: a list of strings
        '''
        return _lasso.lib_logout_request_get_session_indexes(self._cptr)

    sessionIndexes = property(getSessionIndexes, setSessionIndexes)

class SamlAuthorityBinding(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml_authority_binding_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_authorityKind(self):
        t = _lasso.SamlAuthorityBinding_authorityKind_get(self._cptr)
        return t;
    def set_authorityKind(self, value):
        value = str2lasso(value)
        _lasso.SamlAuthorityBinding_authorityKind_set(self._cptr, value)
    authorityKind = property(get_authorityKind, set_authorityKind)

    def get_location(self):
        t = _lasso.SamlAuthorityBinding_location_get(self._cptr)
        return t;
    def set_location(self, value):
        value = str2lasso(value)
        _lasso.SamlAuthorityBinding_location_set(self._cptr, value)
    location = property(get_location, set_location)

    def get_binding(self):
        t = _lasso.SamlAuthorityBinding_binding_get(self._cptr)
        return t;
    def set_binding(self, value):
        value = str2lasso(value)
        _lasso.SamlAuthorityBinding_binding_set(self._cptr, value)
    binding = property(get_binding, set_binding)


class SamlAttributeValue(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml_attribute_value_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_any(self):
        t = _lasso.SamlAttributeValue_any_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_any(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.SamlAttributeValue_any_set(self._cptr, value)
    any = property(get_any, set_any)


class SamlpResponseAbstract(Node):
    def get_responseId(self):
        t = _lasso.SamlpResponseAbstract_responseId_get(self._cptr)
        return t;
    def set_responseId(self, value):
        value = str2lasso(value)
        _lasso.SamlpResponseAbstract_responseId_set(self._cptr, value)
    responseId = property(get_responseId, set_responseId)

    def get_inResponseTo(self):
        t = _lasso.SamlpResponseAbstract_inResponseTo_get(self._cptr)
        return t;
    def set_inResponseTo(self, value):
        value = str2lasso(value)
        _lasso.SamlpResponseAbstract_inResponseTo_set(self._cptr, value)
    inResponseTo = property(get_inResponseTo, set_inResponseTo)

    def get_majorVersion(self):
        t = _lasso.SamlpResponseAbstract_majorVersion_get(self._cptr)
        return t;
    def set_majorVersion(self, value):
        _lasso.SamlpResponseAbstract_majorVersion_set(self._cptr, value)
    majorVersion = property(get_majorVersion, set_majorVersion)

    def get_minorVersion(self):
        t = _lasso.SamlpResponseAbstract_minorVersion_get(self._cptr)
        return t;
    def set_minorVersion(self, value):
        _lasso.SamlpResponseAbstract_minorVersion_set(self._cptr, value)
    minorVersion = property(get_minorVersion, set_minorVersion)

    def get_issueInstant(self):
        t = _lasso.SamlpResponseAbstract_issueInstant_get(self._cptr)
        return t;
    def set_issueInstant(self, value):
        value = str2lasso(value)
        _lasso.SamlpResponseAbstract_issueInstant_set(self._cptr, value)
    issueInstant = property(get_issueInstant, set_issueInstant)

    def get_recipient(self):
        t = _lasso.SamlpResponseAbstract_recipient_get(self._cptr)
        return t;
    def set_recipient(self, value):
        value = str2lasso(value)
        _lasso.SamlpResponseAbstract_recipient_set(self._cptr, value)
    recipient = property(get_recipient, set_recipient)

    def get_signType(self):
        t = _lasso.SamlpResponseAbstract_signType_get(self._cptr)
        return t;
    def set_signType(self, value):
        _lasso.SamlpResponseAbstract_signType_set(self._cptr, value)
    signType = property(get_signType, set_signType)

    def get_signMethod(self):
        t = _lasso.SamlpResponseAbstract_signMethod_get(self._cptr)
        return t;
    def set_signMethod(self, value):
        _lasso.SamlpResponseAbstract_signMethod_set(self._cptr, value)
    signMethod = property(get_signMethod, set_signMethod)

    def get_privateKeyFile(self):
        t = _lasso.SamlpResponseAbstract_privateKeyFile_get(self._cptr)
        return t;
    def set_privateKeyFile(self, value):
        value = str2lasso(value)
        _lasso.SamlpResponseAbstract_privateKeyFile_set(self._cptr, value)
    privateKeyFile = property(get_privateKeyFile, set_privateKeyFile)

    def get_certificateFile(self):
        t = _lasso.SamlpResponseAbstract_certificateFile_get(self._cptr)
        return t;
    def set_certificateFile(self, value):
        value = str2lasso(value)
        _lasso.SamlpResponseAbstract_certificateFile_set(self._cptr, value)
    certificateFile = property(get_certificateFile, set_certificateFile)

    def fill(self, InResponseTo, Recipient):
        _lasso.samlp_response_abstract_fill(self._cptr, str2lasso(InResponseTo), str2lasso(Recipient))


class LibStatusResponse(SamlpResponseAbstract):
    def __init__(self, ):
        self._cptr = _lasso.lib_status_response_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_extension(self):
        t = _lasso.LibStatusResponse_extension_get(self._cptr)
        return t;
    def set_extension(self, value):
        _lasso.LibStatusResponse_extension_set(self._cptr, value)
    extension = property(get_extension, set_extension)

    def get_providerId(self):
        t = _lasso.LibStatusResponse_providerId_get(self._cptr)
        return t;
    def set_providerId(self, value):
        value = str2lasso(value)
        _lasso.LibStatusResponse_providerId_set(self._cptr, value)
    providerId = property(get_providerId, set_providerId)

    def get_status(self):
        t = _lasso.LibStatusResponse_status_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_status(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibStatusResponse_status_set(self._cptr, value)
    status = property(get_status, set_status)

    def get_relayState(self):
        t = _lasso.LibStatusResponse_relayState_get(self._cptr)
        return t;
    def set_relayState(self, value):
        value = str2lasso(value)
        _lasso.LibStatusResponse_relayState_set(self._cptr, value)
    relayState = property(get_relayState, set_relayState)


class LibRegisterNameIdentifierResponse(LibStatusResponse):
    def __init__(self, ):
        self._cptr = _lasso.lib_register_name_identifier_response_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFull(cls, providerID, statusCodeValue, request, sign_type, sign_method):
         return cptrToPy(_lasso.lib_register_name_identifier_response_new_full(str2lasso(providerID), str2lasso(statusCodeValue), request and request._cptr, sign_type, sign_method))


class SamlpResponse(SamlpResponseAbstract):
    def __init__(self, ):
        self._cptr = _lasso.samlp_response_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_status(self):
        t = _lasso.SamlpResponse_status_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_status(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlpResponse_status_set(self._cptr, value)
    status = property(get_status, set_status)

    def get_assertion(self):
        t = _lasso.SamlpResponse_assertion_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_assertion(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.SamlpResponse_assertion_set(self._cptr, value)
    assertion = property(get_assertion, set_assertion)


class LibAuthnResponse(SamlpResponse):
    def __init__(self, providerID, request):
        self._cptr = _lasso.lib_authn_response_new(str2lasso(providerID), request and request._cptr)
        if self._cptr is None:
            raise Error('failed to create object')

    def get_extension(self):
        t = _lasso.LibAuthnResponse_extension_get(self._cptr)
        return t;
    def set_extension(self, value):
        _lasso.LibAuthnResponse_extension_set(self._cptr, value)
    extension = property(get_extension, set_extension)

    def get_providerId(self):
        t = _lasso.LibAuthnResponse_providerId_get(self._cptr)
        return t;
    def set_providerId(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnResponse_providerId_set(self._cptr, value)
    providerId = property(get_providerId, set_providerId)

    def get_relayState(self):
        t = _lasso.LibAuthnResponse_relayState_get(self._cptr)
        return t;
    def set_relayState(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnResponse_relayState_set(self._cptr, value)
    relayState = property(get_relayState, set_relayState)

    def get_consent(self):
        t = _lasso.LibAuthnResponse_consent_get(self._cptr)
        return t;
    def set_consent(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnResponse_consent_set(self._cptr, value)
    consent = property(get_consent, set_consent)


class LibNameIdentifierMappingResponse(SamlpResponseAbstract):
    def __init__(self, ):
        self._cptr = _lasso.lib_name_identifier_mapping_response_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFull(cls, provideRID, statusCodeValue, request, sign_type, sign_method):
         return cptrToPy(_lasso.lib_name_identifier_mapping_response_new_full(str2lasso(provideRID), str2lasso(statusCodeValue), request and request._cptr, sign_type, sign_method))

    def get_extension(self):
        t = _lasso.LibNameIdentifierMappingResponse_extension_get(self._cptr)
        return t;
    def set_extension(self, value):
        _lasso.LibNameIdentifierMappingResponse_extension_set(self._cptr, value)
    extension = property(get_extension, set_extension)

    def get_providerId(self):
        t = _lasso.LibNameIdentifierMappingResponse_providerId_get(self._cptr)
        return t;
    def set_providerId(self, value):
        value = str2lasso(value)
        _lasso.LibNameIdentifierMappingResponse_providerId_set(self._cptr, value)
    providerId = property(get_providerId, set_providerId)

    def get_status(self):
        t = _lasso.LibNameIdentifierMappingResponse_status_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_status(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibNameIdentifierMappingResponse_status_set(self._cptr, value)
    status = property(get_status, set_status)

    def get_nameIdentifier(self):
        t = _lasso.LibNameIdentifierMappingResponse_nameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibNameIdentifierMappingResponse_nameIdentifier_set(self._cptr, value)
    nameIdentifier = property(get_nameIdentifier, set_nameIdentifier)


class PaosResponse(Node):
    def __init__(self, refToMessageID = None):
        self._cptr = _lasso.paos_response_new(str2lasso(refToMessageID))
        if self._cptr is None:
            raise Error('failed to create object')

    def get_refToMessageId(self):
        t = _lasso.PaosResponse_refToMessageId_get(self._cptr)
        return t;
    def set_refToMessageId(self, value):
        value = str2lasso(value)
        _lasso.PaosResponse_refToMessageId_set(self._cptr, value)
    refToMessageId = property(get_refToMessageId, set_refToMessageId)

    def get_mustUnderstand(self):
        t = _lasso.PaosResponse_mustUnderstand_get(self._cptr)
        return t;
    def set_mustUnderstand(self, value):
        _lasso.PaosResponse_mustUnderstand_set(self._cptr, value)
    mustUnderstand = property(get_mustUnderstand, set_mustUnderstand)

    def get_actor(self):
        t = _lasso.PaosResponse_actor_get(self._cptr)
        return t;
    def set_actor(self, value):
        value = str2lasso(value)
        _lasso.PaosResponse_actor_set(self._cptr, value)
    actor = property(get_actor, set_actor)

    def validate(self):
        '''
        Validates the object conforms to required values.
        
         - <listitem>mustUnderstand must be TRUE</listitem>   <listitem>actor
           must be equal to #LASSO_SOAP_ENV_ACTOR</listitem>
        
        Returns: 0 on success, error code otherwise
        '''
        return _lasso.paos_response_validate(self._cptr)


class SamlpStatus(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp_status_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_statusCode(self):
        t = _lasso.SamlpStatus_statusCode_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_statusCode(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlpStatus_statusCode_set(self._cptr, value)
    statusCode = property(get_statusCode, set_statusCode)

    def get_statusMessage(self):
        t = _lasso.SamlpStatus_statusMessage_get(self._cptr)
        return t;
    def set_statusMessage(self, value):
        value = str2lasso(value)
        _lasso.SamlpStatus_statusMessage_set(self._cptr, value)
    statusMessage = property(get_statusMessage, set_statusMessage)


class LibAuthnRequestEnvelope(Node):
    def __init__(self, ):
        self._cptr = _lasso.lib_authn_request_envelope_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFull(cls, authnRequest, providerID, assertionConsumerServiceURL):
         return cptrToPy(_lasso.lib_authn_request_envelope_new_full(authnRequest and authnRequest._cptr, str2lasso(providerID), str2lasso(assertionConsumerServiceURL)))

    def get_extension(self):
        t = _lasso.LibAuthnRequestEnvelope_extension_get(self._cptr)
        return t;
    def set_extension(self, value):
        _lasso.LibAuthnRequestEnvelope_extension_set(self._cptr, value)
    extension = property(get_extension, set_extension)

    def get_authnRequest(self):
        t = _lasso.LibAuthnRequestEnvelope_authnRequest_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_authnRequest(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibAuthnRequestEnvelope_authnRequest_set(self._cptr, value)
    authnRequest = property(get_authnRequest, set_authnRequest)

    def get_providerId(self):
        t = _lasso.LibAuthnRequestEnvelope_providerId_get(self._cptr)
        return t;
    def set_providerId(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnRequestEnvelope_providerId_set(self._cptr, value)
    providerId = property(get_providerId, set_providerId)

    def get_providerName(self):
        t = _lasso.LibAuthnRequestEnvelope_providerName_get(self._cptr)
        return t;
    def set_providerName(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnRequestEnvelope_providerName_set(self._cptr, value)
    providerName = property(get_providerName, set_providerName)

    def get_assertionConsumerServiceUrl(self):
        t = _lasso.LibAuthnRequestEnvelope_assertionConsumerServiceUrl_get(self._cptr)
        return t;
    def set_assertionConsumerServiceUrl(self, value):
        value = str2lasso(value)
        _lasso.LibAuthnRequestEnvelope_assertionConsumerServiceUrl_set(self._cptr, value)
    assertionConsumerServiceUrl = property(get_assertionConsumerServiceUrl, set_assertionConsumerServiceUrl)
    assertionConsumerServiceURL = assertionConsumerServiceUrl

    def get_idpList(self):
        t = _lasso.LibAuthnRequestEnvelope_idpList_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_idpList(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibAuthnRequestEnvelope_idpList_set(self._cptr, value)
    idpList = property(get_idpList, set_idpList)
    iDPList = idpList

    def get_isPassive(self):
        t = _lasso.LibAuthnRequestEnvelope_isPassive_get(self._cptr)
        return t;
    def set_isPassive(self, value):
        _lasso.LibAuthnRequestEnvelope_isPassive_set(self._cptr, value)
    isPassive = property(get_isPassive, set_isPassive)


class MiscTextNode(Node):
    def __init__(self, ):
        self._cptr = _lasso.misc_text_node_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newWithString(cls, content):
         return cptrToPy(_lasso.misc_text_node_new_with_string(str2lasso(content)))

    @classmethod
    def newWithXmlNode(cls, xml_node):
         return cptrToPy(_lasso.misc_text_node_new_with_xml_node(xml_node))

    def get_content(self):
        t = _lasso.MiscTextNode_content_get(self._cptr)
        return t;
    def set_content(self, value):
        value = str2lasso(value)
        _lasso.MiscTextNode_content_set(self._cptr, value)
    content = property(get_content, set_content)

    def get_name(self):
        t = _lasso.MiscTextNode_name_get(self._cptr)
        return t;
    def set_name(self, value):
        value = str2lasso(value)
        _lasso.MiscTextNode_name_set(self._cptr, value)
    name = property(get_name, set_name)

    def get_nsHref(self):
        t = _lasso.MiscTextNode_nsHref_get(self._cptr)
        return t;
    def set_nsHref(self, value):
        value = str2lasso(value)
        _lasso.MiscTextNode_nsHref_set(self._cptr, value)
    nsHref = property(get_nsHref, set_nsHref)

    def get_nsPrefix(self):
        t = _lasso.MiscTextNode_nsPrefix_get(self._cptr)
        return t;
    def set_nsPrefix(self, value):
        value = str2lasso(value)
        _lasso.MiscTextNode_nsPrefix_set(self._cptr, value)
    nsPrefix = property(get_nsPrefix, set_nsPrefix)

    def get_textChild(self):
        t = _lasso.MiscTextNode_textChild_get(self._cptr)
        return t;
    def set_textChild(self, value):
        _lasso.MiscTextNode_textChild_set(self._cptr, value)
    textChild = property(get_textChild, set_textChild)

    def setXmlContent(self, node):
        '''
        Set the xml content of this L{MiscTextNode}
        '''
        _lasso.misc_text_node_set_xml_content(self._cptr, node)

    def getXmlContent(self):
        '''
        Return the xml content in this node.
        
        @return: an #xmlNode or None.
        '''
        return _lasso.misc_text_node_get_xml_content(self._cptr)

    xmlContent = property(getXmlContent, setXmlContent)

class SamlAuthenticationStatement(SamlSubjectStatementAbstract):
    def __init__(self, ):
        self._cptr = _lasso.saml_authentication_statement_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_subjectLocality(self):
        t = _lasso.SamlAuthenticationStatement_subjectLocality_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_subjectLocality(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SamlAuthenticationStatement_subjectLocality_set(self._cptr, value)
    subjectLocality = property(get_subjectLocality, set_subjectLocality)

    def get_authorityBinding(self):
        t = _lasso.SamlAuthenticationStatement_authorityBinding_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_authorityBinding(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.SamlAuthenticationStatement_authorityBinding_set(self._cptr, value)
    authorityBinding = property(get_authorityBinding, set_authorityBinding)

    def get_authenticationMethod(self):
        t = _lasso.SamlAuthenticationStatement_authenticationMethod_get(self._cptr)
        return t;
    def set_authenticationMethod(self, value):
        value = str2lasso(value)
        _lasso.SamlAuthenticationStatement_authenticationMethod_set(self._cptr, value)
    authenticationMethod = property(get_authenticationMethod, set_authenticationMethod)

    def get_authenticationInstant(self):
        t = _lasso.SamlAuthenticationStatement_authenticationInstant_get(self._cptr)
        return t;
    def set_authenticationInstant(self, value):
        value = str2lasso(value)
        _lasso.SamlAuthenticationStatement_authenticationInstant_set(self._cptr, value)
    authenticationInstant = property(get_authenticationInstant, set_authenticationInstant)


class LibAuthenticationStatement(SamlAuthenticationStatement):
    def __init__(self, ):
        self._cptr = _lasso.lib_authentication_statement_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFull(cls, authenticationMethod, authenticationInstant, reauthenticateOnOrAfter, sp_identifier, idp_identifier):
         return cptrToPy(_lasso.lib_authentication_statement_new_full(str2lasso(authenticationMethod), str2lasso(authenticationInstant), str2lasso(reauthenticateOnOrAfter), sp_identifier and sp_identifier._cptr, idp_identifier and idp_identifier._cptr))

    def get_authnContext(self):
        t = _lasso.LibAuthenticationStatement_authnContext_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_authnContext(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibAuthenticationStatement_authnContext_set(self._cptr, value)
    authnContext = property(get_authnContext, set_authnContext)

    def get_reauthenticateOnOrAfter(self):
        t = _lasso.LibAuthenticationStatement_reauthenticateOnOrAfter_get(self._cptr)
        return t;
    def set_reauthenticateOnOrAfter(self, value):
        value = str2lasso(value)
        _lasso.LibAuthenticationStatement_reauthenticateOnOrAfter_set(self._cptr, value)
    reauthenticateOnOrAfter = property(get_reauthenticateOnOrAfter, set_reauthenticateOnOrAfter)

    def get_sessionIndex(self):
        t = _lasso.LibAuthenticationStatement_sessionIndex_get(self._cptr)
        return t;
    def set_sessionIndex(self, value):
        value = str2lasso(value)
        _lasso.LibAuthenticationStatement_sessionIndex_set(self._cptr, value)
    sessionIndex = property(get_sessionIndex, set_sessionIndex)


class LibIDPEntry(Node):
    def __init__(self, ):
        self._cptr = _lasso.lib_idp_entry_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_providerId(self):
        t = _lasso.LibIDPEntry_providerId_get(self._cptr)
        return t;
    def set_providerId(self, value):
        value = str2lasso(value)
        _lasso.LibIDPEntry_providerId_set(self._cptr, value)
    providerId = property(get_providerId, set_providerId)

    def get_providerName(self):
        t = _lasso.LibIDPEntry_providerName_get(self._cptr)
        return t;
    def set_providerName(self, value):
        value = str2lasso(value)
        _lasso.LibIDPEntry_providerName_set(self._cptr, value)
    providerName = property(get_providerName, set_providerName)

    def get_loc(self):
        t = _lasso.LibIDPEntry_loc_get(self._cptr)
        return t;
    def set_loc(self, value):
        value = str2lasso(value)
        _lasso.LibIDPEntry_loc_set(self._cptr, value)
    loc = property(get_loc, set_loc)


class SamlNameIdentifier(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml_name_identifier_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromXmlNode(cls, xmlnode):
         return cptrToPy(_lasso.saml_name_identifier_new_from_xmlNode(xmlnode))

    def get_nameQualifier(self):
        t = _lasso.SamlNameIdentifier_nameQualifier_get(self._cptr)
        return t;
    def set_nameQualifier(self, value):
        value = str2lasso(value)
        _lasso.SamlNameIdentifier_nameQualifier_set(self._cptr, value)
    nameQualifier = property(get_nameQualifier, set_nameQualifier)

    def get_format(self):
        t = _lasso.SamlNameIdentifier_format_get(self._cptr)
        return t;
    def set_format(self, value):
        value = str2lasso(value)
        _lasso.SamlNameIdentifier_format_set(self._cptr, value)
    format = property(get_format, set_format)

    def get_content(self):
        t = _lasso.SamlNameIdentifier_content_get(self._cptr)
        return t;
    def set_content(self, value):
        value = str2lasso(value)
        _lasso.SamlNameIdentifier_content_set(self._cptr, value)
    content = property(get_content, set_content)

    def equals(self, b):
        return _lasso.saml_name_identifier_equals(self._cptr, b and b._cptr)


class LibSubject(SamlSubject):
    def __init__(self, ):
        self._cptr = _lasso.lib_subject_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_idpProvidedNameIdentifier(self):
        t = _lasso.LibSubject_idpProvidedNameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_idpProvidedNameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibSubject_idpProvidedNameIdentifier_set(self._cptr, value)
    idpProvidedNameIdentifier = property(get_idpProvidedNameIdentifier, set_idpProvidedNameIdentifier)
    iDPProvidedNameIdentifier = idpProvidedNameIdentifier


class LibIDPEntries(Node):
    def __init__(self, ):
        self._cptr = _lasso.lib_idp_entries_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_idpEntry(self):
        t = _lasso.LibIDPEntries_idpEntry_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_idpEntry(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.LibIDPEntries_idpEntry_set(self._cptr, value)
    idpEntry = property(get_idpEntry, set_idpEntry)
    iDPEntry = idpEntry


class LibRegisterNameIdentifierRequest(SamlpRequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.lib_register_name_identifier_request_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFull(cls, providerID, idpNameIdentifier, spNameIdentifier, oldNameIdentifier, sign_type, sign_method):
         return cptrToPy(_lasso.lib_register_name_identifier_request_new_full(str2lasso(providerID), idpNameIdentifier and idpNameIdentifier._cptr, spNameIdentifier and spNameIdentifier._cptr, oldNameIdentifier and oldNameIdentifier._cptr, sign_type, sign_method))

    def get_extension(self):
        t = _lasso.LibRegisterNameIdentifierRequest_extension_get(self._cptr)
        return t;
    def set_extension(self, value):
        _lasso.LibRegisterNameIdentifierRequest_extension_set(self._cptr, value)
    extension = property(get_extension, set_extension)

    def get_providerId(self):
        t = _lasso.LibRegisterNameIdentifierRequest_providerId_get(self._cptr)
        return t;
    def set_providerId(self, value):
        value = str2lasso(value)
        _lasso.LibRegisterNameIdentifierRequest_providerId_set(self._cptr, value)
    providerId = property(get_providerId, set_providerId)

    def get_idpProvidedNameIdentifier(self):
        t = _lasso.LibRegisterNameIdentifierRequest_idpProvidedNameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_idpProvidedNameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibRegisterNameIdentifierRequest_idpProvidedNameIdentifier_set(self._cptr, value)
    idpProvidedNameIdentifier = property(get_idpProvidedNameIdentifier, set_idpProvidedNameIdentifier)
    iDPProvidedNameIdentifier = idpProvidedNameIdentifier

    def get_spProvidedNameIdentifier(self):
        t = _lasso.LibRegisterNameIdentifierRequest_spProvidedNameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_spProvidedNameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibRegisterNameIdentifierRequest_spProvidedNameIdentifier_set(self._cptr, value)
    spProvidedNameIdentifier = property(get_spProvidedNameIdentifier, set_spProvidedNameIdentifier)
    sPProvidedNameIdentifier = spProvidedNameIdentifier

    def get_oldProvidedNameIdentifier(self):
        t = _lasso.LibRegisterNameIdentifierRequest_oldProvidedNameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_oldProvidedNameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibRegisterNameIdentifierRequest_oldProvidedNameIdentifier_set(self._cptr, value)
    oldProvidedNameIdentifier = property(get_oldProvidedNameIdentifier, set_oldProvidedNameIdentifier)

    def get_relayState(self):
        t = _lasso.LibRegisterNameIdentifierRequest_relayState_get(self._cptr)
        return t;
    def set_relayState(self, value):
        value = str2lasso(value)
        _lasso.LibRegisterNameIdentifierRequest_relayState_set(self._cptr, value)
    relayState = property(get_relayState, set_relayState)


class LibFederationTerminationNotification(SamlpRequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.lib_federation_termination_notification_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFull(cls, providerID, nameIdentifier, sign_type, sign_method):
         return cptrToPy(_lasso.lib_federation_termination_notification_new_full(str2lasso(providerID), nameIdentifier and nameIdentifier._cptr, sign_type, sign_method))

    def get_extension(self):
        t = _lasso.LibFederationTerminationNotification_extension_get(self._cptr)
        return t;
    def set_extension(self, value):
        _lasso.LibFederationTerminationNotification_extension_set(self._cptr, value)
    extension = property(get_extension, set_extension)

    def get_providerId(self):
        t = _lasso.LibFederationTerminationNotification_providerId_get(self._cptr)
        return t;
    def set_providerId(self, value):
        value = str2lasso(value)
        _lasso.LibFederationTerminationNotification_providerId_set(self._cptr, value)
    providerId = property(get_providerId, set_providerId)

    def get_nameIdentifier(self):
        t = _lasso.LibFederationTerminationNotification_nameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.LibFederationTerminationNotification_nameIdentifier_set(self._cptr, value)
    nameIdentifier = property(get_nameIdentifier, set_nameIdentifier)

    def get_consent(self):
        t = _lasso.LibFederationTerminationNotification_consent_get(self._cptr)
        return t;
    def set_consent(self, value):
        value = str2lasso(value)
        _lasso.LibFederationTerminationNotification_consent_set(self._cptr, value)
    consent = property(get_consent, set_consent)

    def get_relayState(self):
        t = _lasso.LibFederationTerminationNotification_relayState_get(self._cptr)
        return t;
    def set_relayState(self, value):
        value = str2lasso(value)
        _lasso.LibFederationTerminationNotification_relayState_set(self._cptr, value)
    relayState = property(get_relayState, set_relayState)


class LibLogoutResponse(LibStatusResponse):
    def __init__(self, ):
        self._cptr = _lasso.lib_logout_response_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFull(cls, providerID, statusCodeValue, request, sign_type, sign_method):
         return cptrToPy(_lasso.lib_logout_response_new_full(str2lasso(providerID), str2lasso(statusCodeValue), request and request._cptr, sign_type, sign_method))


class DsX509Data(Node):
    def __init__(self, ):
        self._cptr = _lasso.ds_x509_data_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def getCertificate(self):
        '''
        Return the content of the X509Certificate sub-element, it should be a
        base64 encoded string.
        
        @return: the string currently set in the X509Certificate private field
            of the L{DsX509Data} structure.
        '''
        return _lasso.ds_x509_data_get_certificate(self._cptr)

    def setCertificate(self, certificate):
        '''
        Set the content of the X509Certificate sub-element, it should be a
        base64 encoded string.
        
        @param certificate:  a base64 encoded string of the DER representation
            of the X509 certificate
        '''
        _lasso.ds_x509_data_set_certificate(self._cptr, str2lasso(certificate))

    def getSubjectName(self):
        '''
        Return the content of the X509SubjectName sub-element, it should be a
        base64 encoded string.
        
        @return: the string currently set in the X509SubjectName private field
            of the L{DsX509Data} structure.
        '''
        return _lasso.ds_x509_data_get_subject_name(self._cptr)

    def setSubjectName(self, subject_name):
        '''
        Set the content of the X509SubjectName sub-element, it should be a
        base64 encoded string.
        
        @param subject_name:  a base64 encoded string of the DER
            representation of the X509 subject_name
        '''
        _lasso.ds_x509_data_set_subject_name(self._cptr, str2lasso(subject_name))

    def getCrl(self):
        '''
        Return the content of the X509CRL sub-element, it should be a base64
        encoded string.
        
        @return: the string currently set in the X509CRL private field of the
            L{DsX509Data} structure.
        '''
        return _lasso.ds_x509_data_get_crl(self._cptr)

    def setCrl(self, crl):
        '''
        Set the content of the X509CRL sub-element, it should be a base64
        encoded string.
        
        @param crl:  a base64 encoded string of the DER representation of the
            X509 CRL
        '''
        _lasso.ds_x509_data_set_crl(self._cptr, str2lasso(crl))

    certificate = property(getCertificate, setCertificate)
    subjectName = property(getSubjectName, setSubjectName)
    crl = property(getCrl, setCrl)

class DsRsaKeyValue(Node):
    def __init__(self, ):
        self._cptr = _lasso.ds_rsa_key_value_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_modulus(self):
        t = _lasso.DsRsaKeyValue_modulus_get(self._cptr)
        return t;
    def set_modulus(self, value):
        value = str2lasso(value)
        _lasso.DsRsaKeyValue_modulus_set(self._cptr, value)
    modulus = property(get_modulus, set_modulus)

    def get_exponent(self):
        t = _lasso.DsRsaKeyValue_exponent_get(self._cptr)
        return t;
    def set_exponent(self, value):
        value = str2lasso(value)
        _lasso.DsRsaKeyValue_exponent_set(self._cptr, value)
    exponent = property(get_exponent, set_exponent)


class DsKeyInfo(Node):
    def __init__(self, ):
        self._cptr = _lasso.ds_key_info_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_keyValue(self):
        t = _lasso.DsKeyInfo_keyValue_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_keyValue(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.DsKeyInfo_keyValue_set(self._cptr, value)
    keyValue = property(get_keyValue, set_keyValue)


class DsKeyValue(Node):
    def __init__(self, ):
        self._cptr = _lasso.ds_key_value_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_rsaKeyValue(self):
        t = _lasso.DsKeyValue_rsaKeyValue_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_rsaKeyValue(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.DsKeyValue_rsaKeyValue_set(self._cptr, value)
    rsaKeyValue = property(get_rsaKeyValue, set_rsaKeyValue)
    rSAKeyValue = rsaKeyValue

    def getX509Data(self):
        '''
        Get the X509 Data node if there is one.
        
        @return: the internal value of the X509Data field
        '''
        return cptrToPy(_lasso.ds_key_value_get_x509_data(self._cptr))

    def setX509Data(self, x509_data):
        '''
        Set the X509 Data node.
        '''
        _lasso.ds_key_value_set_x509_data(self._cptr, x509_data and x509_data._cptr)

    x509Data = property(getX509Data, setX509Data)

class SoapFault(Node):
    def __init__(self, ):
        self._cptr = _lasso.soap_fault_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromMessage(cls, message):
         return cptrToPy(_lasso.soap_fault_new_from_message(str2lasso(message)))

    @classmethod
    def newFull(cls, faultcode, faultstring):
         return cptrToPy(_lasso.soap_fault_new_full(str2lasso(faultcode), str2lasso(faultstring)))

    def get_faultcode(self):
        t = _lasso.SoapFault_faultcode_get(self._cptr)
        return t;
    def set_faultcode(self, value):
        value = str2lasso(value)
        _lasso.SoapFault_faultcode_set(self._cptr, value)
    faultcode = property(get_faultcode, set_faultcode)

    def get_faultstring(self):
        t = _lasso.SoapFault_faultstring_get(self._cptr)
        return t;
    def set_faultstring(self, value):
        value = str2lasso(value)
        _lasso.SoapFault_faultstring_set(self._cptr, value)
    faultstring = property(get_faultstring, set_faultstring)

    def get_faultactor(self):
        t = _lasso.SoapFault_faultactor_get(self._cptr)
        return t;
    def set_faultactor(self, value):
        _lasso.SoapFault_faultactor_set(self._cptr, value)
    faultactor = property(get_faultactor, set_faultactor)

    def get_detail(self):
        t = _lasso.SoapFault_detail_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_detail(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SoapFault_detail_set(self._cptr, value)
    detail = property(get_detail, set_detail)


class SoapBody(Node):
    def __init__(self, ):
        self._cptr = _lasso.soap_body_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromMessage(cls, message):
         return cptrToPy(_lasso.soap_body_new_from_message(str2lasso(message)))

    def get_any(self):
        t = _lasso.SoapBody_any_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_any(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.SoapBody_any_set(self._cptr, value)
    any = property(get_any, set_any)

    def get_id(self):
        t = _lasso.SoapBody_id_get(self._cptr)
        return t;
    def set_id(self, value):
        value = str2lasso(value)
        _lasso.SoapBody_id_set(self._cptr, value)
    id = property(get_id, set_id)


class SoapEnvelope(Node):
    def __init__(self, body):
        self._cptr = _lasso.soap_envelope_new(body and body._cptr)
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromMessage(cls, message):
         return cptrToPy(_lasso.soap_envelope_new_from_message(str2lasso(message)))

    @classmethod
    def newFull(cls, ):
         return cptrToPy(_lasso.soap_envelope_new_full())

    def get_header(self):
        t = _lasso.SoapEnvelope_header_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_header(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SoapEnvelope_header_set(self._cptr, value)
    header = property(get_header, set_header)

    def get_body(self):
        t = _lasso.SoapEnvelope_body_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_body(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.SoapEnvelope_body_set(self._cptr, value)
    body = property(get_body, set_body)


class SoapDetail(Node):
    def __init__(self, ):
        self._cptr = _lasso.soap_detail_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromMessage(cls, message):
         return cptrToPy(_lasso.soap_detail_new_from_message(str2lasso(message)))

    def get_any(self):
        t = _lasso.SoapDetail_any_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_any(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.SoapDetail_any_set(self._cptr, value)
    any = property(get_any, set_any)


class SoapHeader(Node):
    def __init__(self, ):
        self._cptr = _lasso.soap_header_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromMessage(cls, message):
         return cptrToPy(_lasso.soap_header_new_from_message(str2lasso(message)))

    def get_other(self):
        t = _lasso.SoapHeader_other_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_other(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.SoapHeader_other_set(self._cptr, value)
    other = property(get_other, set_other)


class EcpResponse(Node):
    def __init__(self, AssertionConsumerServiceURL = None):
        self._cptr = _lasso.ecp_response_new(str2lasso(AssertionConsumerServiceURL))
        if self._cptr is None:
            raise Error('failed to create object')

    def get_mustUnderstand(self):
        t = _lasso.EcpResponse_mustUnderstand_get(self._cptr)
        return t;
    def set_mustUnderstand(self, value):
        _lasso.EcpResponse_mustUnderstand_set(self._cptr, value)
    mustUnderstand = property(get_mustUnderstand, set_mustUnderstand)

    def get_actor(self):
        t = _lasso.EcpResponse_actor_get(self._cptr)
        return t;
    def set_actor(self, value):
        value = str2lasso(value)
        _lasso.EcpResponse_actor_set(self._cptr, value)
    actor = property(get_actor, set_actor)

    def get_assertionConsumerServiceUrl(self):
        t = _lasso.EcpResponse_assertionConsumerServiceUrl_get(self._cptr)
        return t;
    def set_assertionConsumerServiceUrl(self, value):
        value = str2lasso(value)
        _lasso.EcpResponse_assertionConsumerServiceUrl_set(self._cptr, value)
    assertionConsumerServiceUrl = property(get_assertionConsumerServiceUrl, set_assertionConsumerServiceUrl)
    assertionConsumerServiceURL = assertionConsumerServiceUrl

    def validate(self):
        '''
        Validates the L{EcpResponse} object conforms to required values.
        
         - <listitem>AssertionConsumerServiceURL must be non-None</listitem>
           <listitem>mustUnderstand must be TRUE</listitem>   <listitem>actor
           must be equal to #LASSO_SOAP_ENV_ACTOR</listitem>
        
        Returns: 0 on success, error code otherwise
        '''
        return _lasso.ecp_response_validate(self._cptr)


class EcpRequest(Node):
    def __init__(self, Issuer, IsPassive, ProviderName, IDPList = None):
        self._cptr = _lasso.ecp_request_new(str2lasso(Issuer), IsPassive, str2lasso(ProviderName), IDPList and IDPList._cptr)
        if self._cptr is None:
            raise Error('failed to create object')

    def get_issuer(self):
        t = _lasso.EcpRequest_issuer_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_issuer(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.EcpRequest_issuer_set(self._cptr, value)
    issuer = property(get_issuer, set_issuer)

    def get_idpList(self):
        t = _lasso.EcpRequest_idpList_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_idpList(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.EcpRequest_idpList_set(self._cptr, value)
    idpList = property(get_idpList, set_idpList)
    iDPList = idpList

    def get_mustUnderstand(self):
        t = _lasso.EcpRequest_mustUnderstand_get(self._cptr)
        return t;
    def set_mustUnderstand(self, value):
        _lasso.EcpRequest_mustUnderstand_set(self._cptr, value)
    mustUnderstand = property(get_mustUnderstand, set_mustUnderstand)

    def get_actor(self):
        t = _lasso.EcpRequest_actor_get(self._cptr)
        return t;
    def set_actor(self, value):
        value = str2lasso(value)
        _lasso.EcpRequest_actor_set(self._cptr, value)
    actor = property(get_actor, set_actor)

    def get_providerName(self):
        t = _lasso.EcpRequest_providerName_get(self._cptr)
        return t;
    def set_providerName(self, value):
        value = str2lasso(value)
        _lasso.EcpRequest_providerName_set(self._cptr, value)
    providerName = property(get_providerName, set_providerName)

    def get_isPassive(self):
        t = _lasso.EcpRequest_isPassive_get(self._cptr)
        return t;
    def set_isPassive(self, value):
        _lasso.EcpRequest_isPassive_set(self._cptr, value)
    isPassive = property(get_isPassive, set_isPassive)

    def validate(self):
        '''
        Validates the L{EcpRequest} object conforms to required values.
        
         - <listitem>mustUnderstand must be TRUE</listitem>   <listitem>actor
           must be equal to #LASSO_SOAP_ENV_ACTOR</listitem>
        
        Returns: 0 on success, error code otherwise
        '''
        return _lasso.ecp_request_validate(self._cptr)


class EcpRelayState(Node):
    def __init__(self, RelayState = None):
        self._cptr = _lasso.ecp_relay_state_new(str2lasso(RelayState))
        if self._cptr is None:
            raise Error('failed to create object')

    def get_relayState(self):
        t = _lasso.EcpRelayState_relayState_get(self._cptr)
        return t;
    def set_relayState(self, value):
        value = str2lasso(value)
        _lasso.EcpRelayState_relayState_set(self._cptr, value)
    relayState = property(get_relayState, set_relayState)

    def get_mustUnderstand(self):
        t = _lasso.EcpRelayState_mustUnderstand_get(self._cptr)
        return t;
    def set_mustUnderstand(self, value):
        _lasso.EcpRelayState_mustUnderstand_set(self._cptr, value)
    mustUnderstand = property(get_mustUnderstand, set_mustUnderstand)

    def get_actor(self):
        t = _lasso.EcpRelayState_actor_get(self._cptr)
        return t;
    def set_actor(self, value):
        value = str2lasso(value)
        _lasso.EcpRelayState_actor_set(self._cptr, value)
    actor = property(get_actor, set_actor)

    def validate(self):
        '''
        Validates the L{EcpRelayState} object conforms to required values.
        
         - <listitem>RelayState must be non-None</listitem>
           <listitem>mustUnderstand must be TRUE</listitem>   <listitem>actor
           must be equal to #LASSO_SOAP_ENV_ACTOR</listitem>
        
        Returns: 0 on success, error code otherwise
        '''
        return _lasso.ecp_relay_state_validate(self._cptr)


class Samlp2RequestedAuthnContext(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_requested_authn_context_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_authnContextClassRef(self):
        t = _lasso.Samlp2RequestedAuthnContext_authnContextClassRef_get(self._cptr)
        return t;
    def set_authnContextClassRef(self, value):
        _lasso.Samlp2RequestedAuthnContext_authnContextClassRef_set(self._cptr, value)
    authnContextClassRef = property(get_authnContextClassRef, set_authnContextClassRef)

    def get_authnContextDeclRef(self):
        t = _lasso.Samlp2RequestedAuthnContext_authnContextDeclRef_get(self._cptr)
        return t;
    def set_authnContextDeclRef(self, value):
        _lasso.Samlp2RequestedAuthnContext_authnContextDeclRef_set(self._cptr, value)
    authnContextDeclRef = property(get_authnContextDeclRef, set_authnContextDeclRef)

    def get_comparison(self):
        t = _lasso.Samlp2RequestedAuthnContext_comparison_get(self._cptr)
        return t;
    def set_comparison(self, value):
        value = str2lasso(value)
        _lasso.Samlp2RequestedAuthnContext_comparison_set(self._cptr, value)
    comparison = property(get_comparison, set_comparison)


class Saml2AuthnContext(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_authn_context_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_authnContextClassRef(self):
        t = _lasso.Saml2AuthnContext_authnContextClassRef_get(self._cptr)
        return t;
    def set_authnContextClassRef(self, value):
        value = str2lasso(value)
        _lasso.Saml2AuthnContext_authnContextClassRef_set(self._cptr, value)
    authnContextClassRef = property(get_authnContextClassRef, set_authnContextClassRef)

    def get_authnContextDeclRef(self):
        t = _lasso.Saml2AuthnContext_authnContextDeclRef_get(self._cptr)
        return t;
    def set_authnContextDeclRef(self, value):
        value = str2lasso(value)
        _lasso.Saml2AuthnContext_authnContextDeclRef_set(self._cptr, value)
    authnContextDeclRef = property(get_authnContextDeclRef, set_authnContextDeclRef)

    def get_authenticatingAuthority(self):
        t = _lasso.Saml2AuthnContext_authenticatingAuthority_get(self._cptr)
        return t;
    def set_authenticatingAuthority(self, value):
        value = str2lasso(value)
        _lasso.Saml2AuthnContext_authenticatingAuthority_set(self._cptr, value)
    authenticatingAuthority = property(get_authenticatingAuthority, set_authenticatingAuthority)


class Saml2Evidence(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_evidence_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_assertionIdRef(self):
        t = _lasso.Saml2Evidence_assertionIdRef_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_assertionIdRef(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Evidence_assertionIdRef_set(self._cptr, value)
    assertionIdRef = property(get_assertionIdRef, set_assertionIdRef)

    def get_assertionUriRef(self):
        t = _lasso.Saml2Evidence_assertionUriRef_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_assertionUriRef(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Evidence_assertionUriRef_set(self._cptr, value)
    assertionUriRef = property(get_assertionUriRef, set_assertionUriRef)
    assertionURIRef = assertionUriRef

    def get_assertion(self):
        t = _lasso.Saml2Evidence_assertion_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_assertion(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Evidence_assertion_set(self._cptr, value)
    assertion = property(get_assertion, set_assertion)

    def get_encryptedAssertion(self):
        t = _lasso.Saml2Evidence_encryptedAssertion_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_encryptedAssertion(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Evidence_encryptedAssertion_set(self._cptr, value)
    encryptedAssertion = property(get_encryptedAssertion, set_encryptedAssertion)


class Saml2NameID(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_name_id_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newWithString(cls, content):
         return cptrToPy(_lasso.saml2_name_id_new_with_string(str2lasso(content)))

    @classmethod
    def newWithPersistentFormat(cls, id, idpID, providerID):
         return cptrToPy(_lasso.saml2_name_id_new_with_persistent_format(str2lasso(id), str2lasso(idpID), str2lasso(providerID)))

    def get_content(self):
        t = _lasso.Saml2NameID_content_get(self._cptr)
        return t;
    def set_content(self, value):
        value = str2lasso(value)
        _lasso.Saml2NameID_content_set(self._cptr, value)
    content = property(get_content, set_content)

    def get_format(self):
        t = _lasso.Saml2NameID_format_get(self._cptr)
        return t;
    def set_format(self, value):
        value = str2lasso(value)
        _lasso.Saml2NameID_format_set(self._cptr, value)
    format = property(get_format, set_format)

    def get_spProvidedId(self):
        t = _lasso.Saml2NameID_spProvidedId_get(self._cptr)
        return t;
    def set_spProvidedId(self, value):
        value = str2lasso(value)
        _lasso.Saml2NameID_spProvidedId_set(self._cptr, value)
    spProvidedId = property(get_spProvidedId, set_spProvidedId)
    sPProvidedId = spProvidedId

    def get_nameQualifier(self):
        t = _lasso.Saml2NameID_nameQualifier_get(self._cptr)
        return t;
    def set_nameQualifier(self, value):
        value = str2lasso(value)
        _lasso.Saml2NameID_nameQualifier_set(self._cptr, value)
    nameQualifier = property(get_nameQualifier, set_nameQualifier)

    def get_spNameQualifier(self):
        t = _lasso.Saml2NameID_spNameQualifier_get(self._cptr)
        return t;
    def set_spNameQualifier(self, value):
        value = str2lasso(value)
        _lasso.Saml2NameID_spNameQualifier_set(self._cptr, value)
    spNameQualifier = property(get_spNameQualifier, set_spNameQualifier)
    sPNameQualifier = spNameQualifier

    def equals(self, other_name_id):
        '''
        Return TRUE if C{self} equals C{other_name_id}.
        
        @param other_name_id:  another L{Saml2NameID} object
        @return: TRUE if the two NameID are equal and are L{Saml2NameID}
            objects, FALSE otherwise.
        '''
        return _lasso.saml2_name_id_equals(self._cptr, other_name_id and other_name_id._cptr)


class Saml2EncryptedElement(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_encrypted_element_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_encryptedData(self):
        t = _lasso.Saml2EncryptedElement_encryptedData_get(self._cptr)
        return t;
    def set_encryptedData(self, value):
        _lasso.Saml2EncryptedElement_encryptedData_set(self._cptr, value)
    encryptedData = property(get_encryptedData, set_encryptedData)

    def get_encryptedKey(self):
        t = _lasso.Saml2EncryptedElement_encryptedKey_get(self._cptr)
        return t;
    def set_encryptedKey(self, value):
        _lasso.Saml2EncryptedElement_encryptedKey_set(self._cptr, value)
    encryptedKey = property(get_encryptedKey, set_encryptedKey)

    def get_originalData(self):
        t = _lasso.Saml2EncryptedElement_originalData_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_originalData(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2EncryptedElement_originalData_set(self._cptr, value)
    originalData = property(get_originalData, set_originalData)

    def serverDecrypt(self, server):
        '''
        Decrypt the given encrypted element using the encryption private key
        of the C{server} object
        
        @param server:  a L{Server} object
        @param decrypted_node:  an output arg for a L{Node}
        @return: 0 if successful, an error code otherwise. See
            lasso_saml2_encrypted_element_server_decrypt().
        '''
        _decrypted_node_out = list((None,))
        rc = _lasso.saml2_encrypted_element_server_decrypt(self._cptr, server and server._cptr, _decrypted_node_out)
        Error.raise_on_rc(rc)
        return _decrypted_node_out[0]


class Saml2SubjectConfirmation(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_subject_confirmation_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_baseId(self):
        t = _lasso.Saml2SubjectConfirmation_baseId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_baseId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2SubjectConfirmation_baseId_set(self._cptr, value)
    baseId = property(get_baseId, set_baseId)

    def get_nameId(self):
        t = _lasso.Saml2SubjectConfirmation_nameId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2SubjectConfirmation_nameId_set(self._cptr, value)
    nameId = property(get_nameId, set_nameId)

    def get_encryptedId(self):
        t = _lasso.Saml2SubjectConfirmation_encryptedId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_encryptedId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2SubjectConfirmation_encryptedId_set(self._cptr, value)
    encryptedId = property(get_encryptedId, set_encryptedId)

    def get_subjectConfirmationData(self):
        t = _lasso.Saml2SubjectConfirmation_subjectConfirmationData_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_subjectConfirmationData(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2SubjectConfirmation_subjectConfirmationData_set(self._cptr, value)
    subjectConfirmationData = property(get_subjectConfirmationData, set_subjectConfirmationData)

    def get_method(self):
        t = _lasso.Saml2SubjectConfirmation_method_get(self._cptr)
        return t;
    def set_method(self, value):
        value = str2lasso(value)
        _lasso.Saml2SubjectConfirmation_method_set(self._cptr, value)
    method = property(get_method, set_method)


class Saml2Action(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_action_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newWithString(cls, content):
         return cptrToPy(_lasso.saml2_action_new_with_string(str2lasso(content)))

    def get_content(self):
        t = _lasso.Saml2Action_content_get(self._cptr)
        return t;
    def set_content(self, value):
        value = str2lasso(value)
        _lasso.Saml2Action_content_set(self._cptr, value)
    content = property(get_content, set_content)

    def get_namespace(self):
        t = _lasso.Saml2Action_namespace_get(self._cptr)
        return t;
    def set_namespace(self, value):
        value = str2lasso(value)
        _lasso.Saml2Action_namespace_set(self._cptr, value)
    namespace = property(get_namespace, set_namespace)


class Samlp2IDPList(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_idp_list_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_idpEntry(self):
        t = _lasso.Samlp2IDPList_idpEntry_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_idpEntry(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Samlp2IDPList_idpEntry_set(self._cptr, value)
    idpEntry = property(get_idpEntry, set_idpEntry)
    iDPEntry = idpEntry

    def get_getComplete(self):
        t = _lasso.Samlp2IDPList_getComplete_get(self._cptr)
        return t;
    def set_getComplete(self, value):
        value = str2lasso(value)
        _lasso.Samlp2IDPList_getComplete_set(self._cptr, value)
    getComplete = property(get_getComplete, set_getComplete)


class Samlp2Terminate(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_terminate_new()
        if self._cptr is None:
            raise Error('failed to create object')


class Saml2SubjectConfirmationData(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_subject_confirmation_data_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_notBefore(self):
        t = _lasso.Saml2SubjectConfirmationData_notBefore_get(self._cptr)
        return t;
    def set_notBefore(self, value):
        value = str2lasso(value)
        _lasso.Saml2SubjectConfirmationData_notBefore_set(self._cptr, value)
    notBefore = property(get_notBefore, set_notBefore)

    def get_notOnOrAfter(self):
        t = _lasso.Saml2SubjectConfirmationData_notOnOrAfter_get(self._cptr)
        return t;
    def set_notOnOrAfter(self, value):
        value = str2lasso(value)
        _lasso.Saml2SubjectConfirmationData_notOnOrAfter_set(self._cptr, value)
    notOnOrAfter = property(get_notOnOrAfter, set_notOnOrAfter)

    def get_recipient(self):
        t = _lasso.Saml2SubjectConfirmationData_recipient_get(self._cptr)
        return t;
    def set_recipient(self, value):
        value = str2lasso(value)
        _lasso.Saml2SubjectConfirmationData_recipient_set(self._cptr, value)
    recipient = property(get_recipient, set_recipient)

    def get_inResponseTo(self):
        t = _lasso.Saml2SubjectConfirmationData_inResponseTo_get(self._cptr)
        return t;
    def set_inResponseTo(self, value):
        value = str2lasso(value)
        _lasso.Saml2SubjectConfirmationData_inResponseTo_set(self._cptr, value)
    inResponseTo = property(get_inResponseTo, set_inResponseTo)

    def get_address(self):
        t = _lasso.Saml2SubjectConfirmationData_address_get(self._cptr)
        return t;
    def set_address(self, value):
        value = str2lasso(value)
        _lasso.Saml2SubjectConfirmationData_address_set(self._cptr, value)
    address = property(get_address, set_address)


class Saml2KeyInfoConfirmationDataType(Saml2SubjectConfirmationData):
    def __init__(self, ):
        self._cptr = _lasso.saml2_key_info_confirmation_data_type_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def getKeyInfo(self):
        '''
        Return the list of KeyInfo node contained in the
        saml2:SubjectConfirmationData of type
        saml2:KeyInfoConfirmationDataType.
        
        @return: a list of L{DsKeyInfo} objects.
        '''
        value = _lasso.saml2_key_info_confirmation_data_type_get_key_info(self._cptr)
        if value is not None:
            value = tuple([cptrToPy(x) for x in value])
        return value

    def setKeyInfo(self, key_infos):
        '''
        Set the list of ds:KeyInfo nodes for the saml2:SubjectConfirmationData
        of type saml2:KeyInfoConfirmationDataType.
        
        @param key_infos:  a list of L{DsKeyInfo} object.
        '''
        _lasso.saml2_key_info_confirmation_data_type_set_key_info(self._cptr, key_infos)

    keyInfo = property(getKeyInfo, setKeyInfo)

class Samlp2IDPEntry(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_idp_entry_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_providerId(self):
        t = _lasso.Samlp2IDPEntry_providerId_get(self._cptr)
        return t;
    def set_providerId(self, value):
        value = str2lasso(value)
        _lasso.Samlp2IDPEntry_providerId_set(self._cptr, value)
    providerId = property(get_providerId, set_providerId)

    def get_name(self):
        t = _lasso.Samlp2IDPEntry_name_get(self._cptr)
        return t;
    def set_name(self, value):
        value = str2lasso(value)
        _lasso.Samlp2IDPEntry_name_set(self._cptr, value)
    name = property(get_name, set_name)

    def get_loc(self):
        t = _lasso.Samlp2IDPEntry_loc_get(self._cptr)
        return t;
    def set_loc(self, value):
        value = str2lasso(value)
        _lasso.Samlp2IDPEntry_loc_set(self._cptr, value)
    loc = property(get_loc, set_loc)


class Saml2Attribute(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_attribute_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_attributeValue(self):
        t = _lasso.Saml2Attribute_attributeValue_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_attributeValue(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Attribute_attributeValue_set(self._cptr, value)
    attributeValue = property(get_attributeValue, set_attributeValue)

    def get_name(self):
        t = _lasso.Saml2Attribute_name_get(self._cptr)
        return t;
    def set_name(self, value):
        value = str2lasso(value)
        _lasso.Saml2Attribute_name_set(self._cptr, value)
    name = property(get_name, set_name)

    def get_nameFormat(self):
        t = _lasso.Saml2Attribute_nameFormat_get(self._cptr)
        return t;
    def set_nameFormat(self, value):
        value = str2lasso(value)
        _lasso.Saml2Attribute_nameFormat_set(self._cptr, value)
    nameFormat = property(get_nameFormat, set_nameFormat)

    def get_friendlyName(self):
        t = _lasso.Saml2Attribute_friendlyName_get(self._cptr)
        return t;
    def set_friendlyName(self, value):
        value = str2lasso(value)
        _lasso.Saml2Attribute_friendlyName_set(self._cptr, value)
    friendlyName = property(get_friendlyName, set_friendlyName)


class Samlp2RequestAbstract(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_request_abstract_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_issuer(self):
        t = _lasso.Samlp2RequestAbstract_issuer_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_issuer(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2RequestAbstract_issuer_set(self._cptr, value)
    issuer = property(get_issuer, set_issuer)

    def get_extensions(self):
        t = _lasso.Samlp2RequestAbstract_extensions_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_extensions(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2RequestAbstract_extensions_set(self._cptr, value)
    extensions = property(get_extensions, set_extensions)

    def get_id(self):
        t = _lasso.Samlp2RequestAbstract_id_get(self._cptr)
        return t;
    def set_id(self, value):
        value = str2lasso(value)
        _lasso.Samlp2RequestAbstract_id_set(self._cptr, value)
    id = property(get_id, set_id)
    iD = id

    def get_version(self):
        t = _lasso.Samlp2RequestAbstract_version_get(self._cptr)
        return t;
    def set_version(self, value):
        value = str2lasso(value)
        _lasso.Samlp2RequestAbstract_version_set(self._cptr, value)
    version = property(get_version, set_version)

    def get_issueInstant(self):
        t = _lasso.Samlp2RequestAbstract_issueInstant_get(self._cptr)
        return t;
    def set_issueInstant(self, value):
        value = str2lasso(value)
        _lasso.Samlp2RequestAbstract_issueInstant_set(self._cptr, value)
    issueInstant = property(get_issueInstant, set_issueInstant)

    def get_destination(self):
        t = _lasso.Samlp2RequestAbstract_destination_get(self._cptr)
        return t;
    def set_destination(self, value):
        value = str2lasso(value)
        _lasso.Samlp2RequestAbstract_destination_set(self._cptr, value)
    destination = property(get_destination, set_destination)

    def get_consent(self):
        t = _lasso.Samlp2RequestAbstract_consent_get(self._cptr)
        return t;
    def set_consent(self, value):
        value = str2lasso(value)
        _lasso.Samlp2RequestAbstract_consent_set(self._cptr, value)
    consent = property(get_consent, set_consent)


class Samlp2AuthnRequest(Samlp2RequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_authn_request_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_subject(self):
        t = _lasso.Samlp2AuthnRequest_subject_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_subject(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2AuthnRequest_subject_set(self._cptr, value)
    subject = property(get_subject, set_subject)

    def get_nameIdPolicy(self):
        t = _lasso.Samlp2AuthnRequest_nameIdPolicy_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameIdPolicy(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2AuthnRequest_nameIdPolicy_set(self._cptr, value)
    nameIdPolicy = property(get_nameIdPolicy, set_nameIdPolicy)

    def get_conditions(self):
        t = _lasso.Samlp2AuthnRequest_conditions_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_conditions(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2AuthnRequest_conditions_set(self._cptr, value)
    conditions = property(get_conditions, set_conditions)

    def get_requestedAuthnContext(self):
        t = _lasso.Samlp2AuthnRequest_requestedAuthnContext_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_requestedAuthnContext(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2AuthnRequest_requestedAuthnContext_set(self._cptr, value)
    requestedAuthnContext = property(get_requestedAuthnContext, set_requestedAuthnContext)

    def get_scoping(self):
        t = _lasso.Samlp2AuthnRequest_scoping_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_scoping(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2AuthnRequest_scoping_set(self._cptr, value)
    scoping = property(get_scoping, set_scoping)

    def get_forceAuthn(self):
        t = _lasso.Samlp2AuthnRequest_forceAuthn_get(self._cptr)
        return t;
    def set_forceAuthn(self, value):
        _lasso.Samlp2AuthnRequest_forceAuthn_set(self._cptr, value)
    forceAuthn = property(get_forceAuthn, set_forceAuthn)

    def get_isPassive(self):
        t = _lasso.Samlp2AuthnRequest_isPassive_get(self._cptr)
        return t;
    def set_isPassive(self, value):
        _lasso.Samlp2AuthnRequest_isPassive_set(self._cptr, value)
    isPassive = property(get_isPassive, set_isPassive)

    def get_protocolBinding(self):
        t = _lasso.Samlp2AuthnRequest_protocolBinding_get(self._cptr)
        return t;
    def set_protocolBinding(self, value):
        value = str2lasso(value)
        _lasso.Samlp2AuthnRequest_protocolBinding_set(self._cptr, value)
    protocolBinding = property(get_protocolBinding, set_protocolBinding)

    def get_assertionConsumerServiceIndex(self):
        t = _lasso.Samlp2AuthnRequest_assertionConsumerServiceIndex_get(self._cptr)
        return t;
    def set_assertionConsumerServiceIndex(self, value):
        _lasso.Samlp2AuthnRequest_assertionConsumerServiceIndex_set(self._cptr, value)
    assertionConsumerServiceIndex = property(get_assertionConsumerServiceIndex, set_assertionConsumerServiceIndex)

    def get_assertionConsumerServiceUrl(self):
        t = _lasso.Samlp2AuthnRequest_assertionConsumerServiceUrl_get(self._cptr)
        return t;
    def set_assertionConsumerServiceUrl(self, value):
        value = str2lasso(value)
        _lasso.Samlp2AuthnRequest_assertionConsumerServiceUrl_set(self._cptr, value)
    assertionConsumerServiceUrl = property(get_assertionConsumerServiceUrl, set_assertionConsumerServiceUrl)
    assertionConsumerServiceURL = assertionConsumerServiceUrl

    def get_attributeConsumingServiceIndex(self):
        t = _lasso.Samlp2AuthnRequest_attributeConsumingServiceIndex_get(self._cptr)
        return t;
    def set_attributeConsumingServiceIndex(self, value):
        _lasso.Samlp2AuthnRequest_attributeConsumingServiceIndex_set(self._cptr, value)
    attributeConsumingServiceIndex = property(get_attributeConsumingServiceIndex, set_attributeConsumingServiceIndex)

    def get_providerName(self):
        t = _lasso.Samlp2AuthnRequest_providerName_get(self._cptr)
        return t;
    def set_providerName(self, value):
        value = str2lasso(value)
        _lasso.Samlp2AuthnRequest_providerName_set(self._cptr, value)
    providerName = property(get_providerName, set_providerName)


class Saml2Conditions(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_conditions_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_condition(self):
        t = _lasso.Saml2Conditions_condition_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_condition(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Conditions_condition_set(self._cptr, value)
    condition = property(get_condition, set_condition)

    def get_audienceRestriction(self):
        t = _lasso.Saml2Conditions_audienceRestriction_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_audienceRestriction(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Conditions_audienceRestriction_set(self._cptr, value)
    audienceRestriction = property(get_audienceRestriction, set_audienceRestriction)

    def get_oneTimeUse(self):
        t = _lasso.Saml2Conditions_oneTimeUse_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_oneTimeUse(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Conditions_oneTimeUse_set(self._cptr, value)
    oneTimeUse = property(get_oneTimeUse, set_oneTimeUse)

    def get_proxyRestriction(self):
        t = _lasso.Saml2Conditions_proxyRestriction_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_proxyRestriction(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Conditions_proxyRestriction_set(self._cptr, value)
    proxyRestriction = property(get_proxyRestriction, set_proxyRestriction)

    def get_notBefore(self):
        t = _lasso.Saml2Conditions_notBefore_get(self._cptr)
        return t;
    def set_notBefore(self, value):
        value = str2lasso(value)
        _lasso.Saml2Conditions_notBefore_set(self._cptr, value)
    notBefore = property(get_notBefore, set_notBefore)

    def get_notOnOrAfter(self):
        t = _lasso.Saml2Conditions_notOnOrAfter_get(self._cptr)
        return t;
    def set_notOnOrAfter(self, value):
        value = str2lasso(value)
        _lasso.Saml2Conditions_notOnOrAfter_set(self._cptr, value)
    notOnOrAfter = property(get_notOnOrAfter, set_notOnOrAfter)


class Samlp2StatusDetail(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_status_detail_new()
        if self._cptr is None:
            raise Error('failed to create object')


class Saml2Subject(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_subject_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_baseId(self):
        t = _lasso.Saml2Subject_baseId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_baseId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2Subject_baseId_set(self._cptr, value)
    baseId = property(get_baseId, set_baseId)

    def get_nameId(self):
        t = _lasso.Saml2Subject_nameId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2Subject_nameId_set(self._cptr, value)
    nameId = property(get_nameId, set_nameId)

    def get_encryptedId(self):
        t = _lasso.Saml2Subject_encryptedId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_encryptedId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2Subject_encryptedId_set(self._cptr, value)
    encryptedId = property(get_encryptedId, set_encryptedId)

    def get_subjectConfirmation(self):
        t = _lasso.Saml2Subject_subjectConfirmation_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_subjectConfirmation(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2Subject_subjectConfirmation_set(self._cptr, value)
    subjectConfirmation = property(get_subjectConfirmation, set_subjectConfirmation)


class Saml2KeyInfoConfirmationData(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_key_info_confirmation_data_new()
        if self._cptr is None:
            raise Error('failed to create object')


class Samlp2StatusResponse(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_status_response_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_issuer(self):
        t = _lasso.Samlp2StatusResponse_issuer_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_issuer(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2StatusResponse_issuer_set(self._cptr, value)
    issuer = property(get_issuer, set_issuer)

    def get_extensions(self):
        t = _lasso.Samlp2StatusResponse_extensions_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_extensions(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2StatusResponse_extensions_set(self._cptr, value)
    extensions = property(get_extensions, set_extensions)

    def get_status(self):
        t = _lasso.Samlp2StatusResponse_status_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_status(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2StatusResponse_status_set(self._cptr, value)
    status = property(get_status, set_status)

    def get_id(self):
        t = _lasso.Samlp2StatusResponse_id_get(self._cptr)
        return t;
    def set_id(self, value):
        value = str2lasso(value)
        _lasso.Samlp2StatusResponse_id_set(self._cptr, value)
    id = property(get_id, set_id)
    iD = id

    def get_inResponseTo(self):
        t = _lasso.Samlp2StatusResponse_inResponseTo_get(self._cptr)
        return t;
    def set_inResponseTo(self, value):
        value = str2lasso(value)
        _lasso.Samlp2StatusResponse_inResponseTo_set(self._cptr, value)
    inResponseTo = property(get_inResponseTo, set_inResponseTo)

    def get_version(self):
        t = _lasso.Samlp2StatusResponse_version_get(self._cptr)
        return t;
    def set_version(self, value):
        value = str2lasso(value)
        _lasso.Samlp2StatusResponse_version_set(self._cptr, value)
    version = property(get_version, set_version)

    def get_issueInstant(self):
        t = _lasso.Samlp2StatusResponse_issueInstant_get(self._cptr)
        return t;
    def set_issueInstant(self, value):
        value = str2lasso(value)
        _lasso.Samlp2StatusResponse_issueInstant_set(self._cptr, value)
    issueInstant = property(get_issueInstant, set_issueInstant)

    def get_destination(self):
        t = _lasso.Samlp2StatusResponse_destination_get(self._cptr)
        return t;
    def set_destination(self, value):
        value = str2lasso(value)
        _lasso.Samlp2StatusResponse_destination_set(self._cptr, value)
    destination = property(get_destination, set_destination)

    def get_consent(self):
        t = _lasso.Samlp2StatusResponse_consent_get(self._cptr)
        return t;
    def set_consent(self, value):
        value = str2lasso(value)
        _lasso.Samlp2StatusResponse_consent_set(self._cptr, value)
    consent = property(get_consent, set_consent)


class Samlp2ArtifactResponse(Samlp2StatusResponse):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_artifact_response_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_any(self):
        t = _lasso.Samlp2ArtifactResponse_any_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_any(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2ArtifactResponse_any_set(self._cptr, value)
    any = property(get_any, set_any)


class Samlp2LogoutResponse(Samlp2StatusResponse):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_logout_response_new()
        if self._cptr is None:
            raise Error('failed to create object')


class Saml2SubjectLocality(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_subject_locality_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_address(self):
        t = _lasso.Saml2SubjectLocality_address_get(self._cptr)
        return t;
    def set_address(self, value):
        value = str2lasso(value)
        _lasso.Saml2SubjectLocality_address_set(self._cptr, value)
    address = property(get_address, set_address)

    def get_dnsName(self):
        t = _lasso.Saml2SubjectLocality_dnsName_get(self._cptr)
        return t;
    def set_dnsName(self, value):
        value = str2lasso(value)
        _lasso.Saml2SubjectLocality_dnsName_set(self._cptr, value)
    dnsName = property(get_dnsName, set_dnsName)
    dNSName = dnsName


class Samlp2SubjectQueryAbstract(Samlp2RequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_subject_query_abstract_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_subject(self):
        t = _lasso.Samlp2SubjectQueryAbstract_subject_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_subject(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2SubjectQueryAbstract_subject_set(self._cptr, value)
    subject = property(get_subject, set_subject)


class Samlp2AttributeQuery(Samlp2SubjectQueryAbstract):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_attribute_query_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_attribute(self):
        t = _lasso.Samlp2AttributeQuery_attribute_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_attribute(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Samlp2AttributeQuery_attribute_set(self._cptr, value)
    attribute = property(get_attribute, set_attribute)


class Samlp2AuthnQuery(Samlp2SubjectQueryAbstract):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_authn_query_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_requestedAuthnContext(self):
        t = _lasso.Samlp2AuthnQuery_requestedAuthnContext_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_requestedAuthnContext(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2AuthnQuery_requestedAuthnContext_set(self._cptr, value)
    requestedAuthnContext = property(get_requestedAuthnContext, set_requestedAuthnContext)

    def get_sessionIndex(self):
        t = _lasso.Samlp2AuthnQuery_sessionIndex_get(self._cptr)
        return t;
    def set_sessionIndex(self, value):
        value = str2lasso(value)
        _lasso.Samlp2AuthnQuery_sessionIndex_set(self._cptr, value)
    sessionIndex = property(get_sessionIndex, set_sessionIndex)


class Samlp2AuthzDecisionQuery(Samlp2SubjectQueryAbstract):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_authz_decision_query_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_action(self):
        t = _lasso.Samlp2AuthzDecisionQuery_action_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_action(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2AuthzDecisionQuery_action_set(self._cptr, value)
    action = property(get_action, set_action)

    def get_evidence(self):
        t = _lasso.Samlp2AuthzDecisionQuery_evidence_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_evidence(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2AuthzDecisionQuery_evidence_set(self._cptr, value)
    evidence = property(get_evidence, set_evidence)

    def get_resource(self):
        t = _lasso.Samlp2AuthzDecisionQuery_resource_get(self._cptr)
        return t;
    def set_resource(self, value):
        value = str2lasso(value)
        _lasso.Samlp2AuthzDecisionQuery_resource_set(self._cptr, value)
    resource = property(get_resource, set_resource)


class Samlp2ManageNameIDRequest(Samlp2RequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_manage_name_id_request_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_nameId(self):
        t = _lasso.Samlp2ManageNameIDRequest_nameId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2ManageNameIDRequest_nameId_set(self._cptr, value)
    nameId = property(get_nameId, set_nameId)

    def get_encryptedId(self):
        t = _lasso.Samlp2ManageNameIDRequest_encryptedId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_encryptedId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2ManageNameIDRequest_encryptedId_set(self._cptr, value)
    encryptedId = property(get_encryptedId, set_encryptedId)

    def get_newId(self):
        t = _lasso.Samlp2ManageNameIDRequest_newId_get(self._cptr)
        return t;
    def set_newId(self, value):
        value = str2lasso(value)
        _lasso.Samlp2ManageNameIDRequest_newId_set(self._cptr, value)
    newId = property(get_newId, set_newId)

    def get_newEncryptedId(self):
        t = _lasso.Samlp2ManageNameIDRequest_newEncryptedId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_newEncryptedId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2ManageNameIDRequest_newEncryptedId_set(self._cptr, value)
    newEncryptedId = property(get_newEncryptedId, set_newEncryptedId)

    def get_terminate(self):
        t = _lasso.Samlp2ManageNameIDRequest_terminate_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_terminate(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2ManageNameIDRequest_terminate_set(self._cptr, value)
    terminate = property(get_terminate, set_terminate)


class Samlp2ManageNameIDResponse(Samlp2StatusResponse):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_manage_name_id_response_new()
        if self._cptr is None:
            raise Error('failed to create object')


class Saml2ConditionAbstract(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_condition_abstract_new()
        if self._cptr is None:
            raise Error('failed to create object')


class Saml2AudienceRestriction(Saml2ConditionAbstract):
    def __init__(self, ):
        self._cptr = _lasso.saml2_audience_restriction_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_audience(self):
        t = _lasso.Saml2AudienceRestriction_audience_get(self._cptr)
        return t;
    def set_audience(self, value):
        value = str2lasso(value)
        _lasso.Saml2AudienceRestriction_audience_set(self._cptr, value)
    audience = property(get_audience, set_audience)


class Saml2ProxyRestriction(Saml2ConditionAbstract):
    def __init__(self, ):
        self._cptr = _lasso.saml2_proxy_restriction_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_audience(self):
        t = _lasso.Saml2ProxyRestriction_audience_get(self._cptr)
        return t;
    def set_audience(self, value):
        value = str2lasso(value)
        _lasso.Saml2ProxyRestriction_audience_set(self._cptr, value)
    audience = property(get_audience, set_audience)

    def get_count(self):
        t = _lasso.Saml2ProxyRestriction_count_get(self._cptr)
        return t;
    def set_count(self, value):
        value = str2lasso(value)
        _lasso.Saml2ProxyRestriction_count_set(self._cptr, value)
    count = property(get_count, set_count)


class Saml2BaseIDAbstract(Node):
    def get_nameQualifier(self):
        t = _lasso.Saml2BaseIDAbstract_nameQualifier_get(self._cptr)
        return t;
    def set_nameQualifier(self, value):
        value = str2lasso(value)
        _lasso.Saml2BaseIDAbstract_nameQualifier_set(self._cptr, value)
    nameQualifier = property(get_nameQualifier, set_nameQualifier)

    def get_spNameQualifier(self):
        t = _lasso.Saml2BaseIDAbstract_spNameQualifier_get(self._cptr)
        return t;
    def set_spNameQualifier(self, value):
        value = str2lasso(value)
        _lasso.Saml2BaseIDAbstract_spNameQualifier_set(self._cptr, value)
    spNameQualifier = property(get_spNameQualifier, set_spNameQualifier)
    sPNameQualifier = spNameQualifier


class Saml2AttributeValue(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_attribute_value_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_any(self):
        t = _lasso.Saml2AttributeValue_any_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_any(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2AttributeValue_any_set(self._cptr, value)
    any = property(get_any, set_any)


class Saml2Advice(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_advice_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_assertionIdRef(self):
        t = _lasso.Saml2Advice_assertionIdRef_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_assertionIdRef(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Advice_assertionIdRef_set(self._cptr, value)
    assertionIdRef = property(get_assertionIdRef, set_assertionIdRef)

    def get_assertionUriRef(self):
        t = _lasso.Saml2Advice_assertionUriRef_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_assertionUriRef(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Advice_assertionUriRef_set(self._cptr, value)
    assertionUriRef = property(get_assertionUriRef, set_assertionUriRef)
    assertionURIRef = assertionUriRef

    def get_assertion(self):
        t = _lasso.Saml2Advice_assertion_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_assertion(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Advice_assertion_set(self._cptr, value)
    assertion = property(get_assertion, set_assertion)

    def get_encryptedAssertion(self):
        t = _lasso.Saml2Advice_encryptedAssertion_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_encryptedAssertion(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Advice_encryptedAssertion_set(self._cptr, value)
    encryptedAssertion = property(get_encryptedAssertion, set_encryptedAssertion)


class Samlp2NameIDMappingRequest(Samlp2RequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_name_id_mapping_request_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_baseId(self):
        t = _lasso.Samlp2NameIDMappingRequest_baseId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_baseId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2NameIDMappingRequest_baseId_set(self._cptr, value)
    baseId = property(get_baseId, set_baseId)

    def get_nameId(self):
        t = _lasso.Samlp2NameIDMappingRequest_nameId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2NameIDMappingRequest_nameId_set(self._cptr, value)
    nameId = property(get_nameId, set_nameId)

    def get_encryptedId(self):
        t = _lasso.Samlp2NameIDMappingRequest_encryptedId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_encryptedId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2NameIDMappingRequest_encryptedId_set(self._cptr, value)
    encryptedId = property(get_encryptedId, set_encryptedId)

    def get_nameIdPolicy(self):
        t = _lasso.Samlp2NameIDMappingRequest_nameIdPolicy_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameIdPolicy(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2NameIDMappingRequest_nameIdPolicy_set(self._cptr, value)
    nameIdPolicy = property(get_nameIdPolicy, set_nameIdPolicy)


class Samlp2NameIDPolicy(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_name_id_policy_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_format(self):
        t = _lasso.Samlp2NameIDPolicy_format_get(self._cptr)
        return t;
    def set_format(self, value):
        value = str2lasso(value)
        _lasso.Samlp2NameIDPolicy_format_set(self._cptr, value)
    format = property(get_format, set_format)

    def get_spNameQualifier(self):
        t = _lasso.Samlp2NameIDPolicy_spNameQualifier_get(self._cptr)
        return t;
    def set_spNameQualifier(self, value):
        value = str2lasso(value)
        _lasso.Samlp2NameIDPolicy_spNameQualifier_set(self._cptr, value)
    spNameQualifier = property(get_spNameQualifier, set_spNameQualifier)
    sPNameQualifier = spNameQualifier

    def get_allowCreate(self):
        t = _lasso.Samlp2NameIDPolicy_allowCreate_get(self._cptr)
        return t;
    def set_allowCreate(self, value):
        _lasso.Samlp2NameIDPolicy_allowCreate_set(self._cptr, value)
    allowCreate = property(get_allowCreate, set_allowCreate)


class Samlp2Response(Samlp2StatusResponse):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_response_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_assertion(self):
        t = _lasso.Samlp2Response_assertion_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_assertion(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Samlp2Response_assertion_set(self._cptr, value)
    assertion = property(get_assertion, set_assertion)

    def get_encryptedAssertion(self):
        t = _lasso.Samlp2Response_encryptedAssertion_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_encryptedAssertion(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Samlp2Response_encryptedAssertion_set(self._cptr, value)
    encryptedAssertion = property(get_encryptedAssertion, set_encryptedAssertion)


class Samlp2Extensions(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_extensions_new()
        if self._cptr is None:
            raise Error('failed to create object')


class Samlp2LogoutRequest(Samlp2RequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_logout_request_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_baseId(self):
        t = _lasso.Samlp2LogoutRequest_baseId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_baseId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2LogoutRequest_baseId_set(self._cptr, value)
    baseId = property(get_baseId, set_baseId)

    def get_nameId(self):
        t = _lasso.Samlp2LogoutRequest_nameId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2LogoutRequest_nameId_set(self._cptr, value)
    nameId = property(get_nameId, set_nameId)

    def get_encryptedId(self):
        t = _lasso.Samlp2LogoutRequest_encryptedId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_encryptedId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2LogoutRequest_encryptedId_set(self._cptr, value)
    encryptedId = property(get_encryptedId, set_encryptedId)

    def get_sessionIndex(self):
        t = _lasso.Samlp2LogoutRequest_sessionIndex_get(self._cptr)
        return t;
    def set_sessionIndex(self, value):
        value = str2lasso(value)
        _lasso.Samlp2LogoutRequest_sessionIndex_set(self._cptr, value)
    sessionIndex = property(get_sessionIndex, set_sessionIndex)

    def get_reason(self):
        t = _lasso.Samlp2LogoutRequest_reason_get(self._cptr)
        return t;
    def set_reason(self, value):
        value = str2lasso(value)
        _lasso.Samlp2LogoutRequest_reason_set(self._cptr, value)
    reason = property(get_reason, set_reason)

    def get_notOnOrAfter(self):
        t = _lasso.Samlp2LogoutRequest_notOnOrAfter_get(self._cptr)
        return t;
    def set_notOnOrAfter(self, value):
        value = str2lasso(value)
        _lasso.Samlp2LogoutRequest_notOnOrAfter_set(self._cptr, value)
    notOnOrAfter = property(get_notOnOrAfter, set_notOnOrAfter)

    def getSessionIndexes(self):
        '''
        If the logout request contains more than one SessionIndex element,
        this method must be used to retrieve due to historical circonstances.
        It will a return a list of the content of the SessionIndex elements.
        
        @return: a #GList of sessions index.
        '''
        return _lasso.samlp2_logout_request_get_session_indexes(self._cptr)

    def setSessionIndexes(self, session_index):
        '''
        If you want to set more than one SessionIndex on a LogoutRequest, use
        this method. Beware that the public field named SessionIndex
        corresponds to the last element in this list. This is an symptom of
        the way elements are parsed by Lasso.
        
        @param session_index:  a list of session index
        '''
        _lasso.samlp2_logout_request_set_session_indexes(self._cptr, session_index)

    sessionIndexes = property(getSessionIndexes, setSessionIndexes)

class Samlp2Scoping(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_scoping_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_idpList(self):
        t = _lasso.Samlp2Scoping_idpList_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_idpList(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2Scoping_idpList_set(self._cptr, value)
    idpList = property(get_idpList, set_idpList)
    iDPList = idpList

    def get_requesterId(self):
        t = _lasso.Samlp2Scoping_requesterId_get(self._cptr)
        return t;
    def set_requesterId(self, value):
        value = str2lasso(value)
        _lasso.Samlp2Scoping_requesterId_set(self._cptr, value)
    requesterId = property(get_requesterId, set_requesterId)

    def get_proxyCount(self):
        t = _lasso.Samlp2Scoping_proxyCount_get(self._cptr)
        return t;
    def set_proxyCount(self, value):
        value = str2lasso(value)
        _lasso.Samlp2Scoping_proxyCount_set(self._cptr, value)
    proxyCount = property(get_proxyCount, set_proxyCount)


class Samlp2StatusCode(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_status_code_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_statusCode(self):
        t = _lasso.Samlp2StatusCode_statusCode_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_statusCode(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2StatusCode_statusCode_set(self._cptr, value)
    statusCode = property(get_statusCode, set_statusCode)

    def get_value(self):
        t = _lasso.Samlp2StatusCode_value_get(self._cptr)
        return t;
    def set_value(self, value):
        value = str2lasso(value)
        _lasso.Samlp2StatusCode_value_set(self._cptr, value)
    value = property(get_value, set_value)


class Samlp2NameIDMappingResponse(Samlp2StatusResponse):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_name_id_mapping_response_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_nameId(self):
        t = _lasso.Samlp2NameIDMappingResponse_nameId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2NameIDMappingResponse_nameId_set(self._cptr, value)
    nameId = property(get_nameId, set_nameId)

    def get_encryptedId(self):
        t = _lasso.Samlp2NameIDMappingResponse_encryptedId_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_encryptedId(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2NameIDMappingResponse_encryptedId_set(self._cptr, value)
    encryptedId = property(get_encryptedId, set_encryptedId)


class Saml2Assertion(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_assertion_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_issuer(self):
        t = _lasso.Saml2Assertion_issuer_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_issuer(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2Assertion_issuer_set(self._cptr, value)
    issuer = property(get_issuer, set_issuer)

    def get_subject(self):
        t = _lasso.Saml2Assertion_subject_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_subject(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2Assertion_subject_set(self._cptr, value)
    subject = property(get_subject, set_subject)

    def get_conditions(self):
        t = _lasso.Saml2Assertion_conditions_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_conditions(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2Assertion_conditions_set(self._cptr, value)
    conditions = property(get_conditions, set_conditions)

    def get_advice(self):
        t = _lasso.Saml2Assertion_advice_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_advice(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2Assertion_advice_set(self._cptr, value)
    advice = property(get_advice, set_advice)

    def get_statement(self):
        t = _lasso.Saml2Assertion_statement_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_statement(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Assertion_statement_set(self._cptr, value)
    statement = property(get_statement, set_statement)

    def get_authnStatement(self):
        t = _lasso.Saml2Assertion_authnStatement_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_authnStatement(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Assertion_authnStatement_set(self._cptr, value)
    authnStatement = property(get_authnStatement, set_authnStatement)

    def get_authzDecisionStatement(self):
        t = _lasso.Saml2Assertion_authzDecisionStatement_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_authzDecisionStatement(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Assertion_authzDecisionStatement_set(self._cptr, value)
    authzDecisionStatement = property(get_authzDecisionStatement, set_authzDecisionStatement)

    def get_attributeStatement(self):
        t = _lasso.Saml2Assertion_attributeStatement_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_attributeStatement(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2Assertion_attributeStatement_set(self._cptr, value)
    attributeStatement = property(get_attributeStatement, set_attributeStatement)

    def get_version(self):
        t = _lasso.Saml2Assertion_version_get(self._cptr)
        return t;
    def set_version(self, value):
        value = str2lasso(value)
        _lasso.Saml2Assertion_version_set(self._cptr, value)
    version = property(get_version, set_version)

    def get_id(self):
        t = _lasso.Saml2Assertion_id_get(self._cptr)
        return t;
    def set_id(self, value):
        value = str2lasso(value)
        _lasso.Saml2Assertion_id_set(self._cptr, value)
    id = property(get_id, set_id)
    iD = id

    def get_issueInstant(self):
        t = _lasso.Saml2Assertion_issueInstant_get(self._cptr)
        return t;
    def set_issueInstant(self, value):
        value = str2lasso(value)
        _lasso.Saml2Assertion_issueInstant_set(self._cptr, value)
    issueInstant = property(get_issueInstant, set_issueInstant)

    def hasAudienceRestriction(self):
        '''
        Verify that a L{Saml2AudienceRestriction} is present in the assertion.
        
        @return: TRUE if a L{Saml2AudienceRestriction} is present in the
            Conditions of the L{Saml2Assertion}.
        '''
        return _lasso.saml2_assertion_has_audience_restriction(self._cptr)

    def isAudienceRestricted(self, providerID):
        '''
        Verify that the assertion is restricted to the given providerID.
        
        @param providerID:  the providerID that will be compared to the
            audience restriction declarations.
        @return: TRUE if C{providerID} is part of a
            L{Saml2AudienceRestriction} element in the assertion, FALSE
            otherwise.
        '''
        return _lasso.saml2_assertion_is_audience_restricted(self._cptr, str2lasso(providerID))

    def setSubjectNameId(self, node):
        '''
        Set the subject NameID, which can be a simple L{Saml2NameID} object or
        an encrypted L{Saml2NameID} as a L{Saml2EncryptedElement}.
        
        @param node:  a L{Saml2NameID} or L{Saml2EncryptedElement}
        '''
        _lasso.saml2_assertion_set_subject_name_id(self._cptr, node and node._cptr)

    def setSubjectConfirmationNameId(self, node):
        '''
        Set the subject NameID, which can be a simple L{Saml2NameID} object or
        an encrypted L{Saml2NameID} as a L{Saml2EncryptedElement}.
        
        @param node:  a L{Saml2NameID} or L{Saml2EncryptedElement}
        '''
        _lasso.saml2_assertion_set_subject_confirmation_name_id(self._cptr, node and node._cptr)

    def setSubjectConfirmationData(self, tolerance, length, Recipient, InResponseTo, Address):
        _lasso.saml2_assertion_set_subject_confirmation_data(self._cptr, tolerance, length, str2lasso(Recipient), str2lasso(InResponseTo), str2lasso(Address))

    def setBasicConditions(self, tolerance = -1, length = -1, one_time_use = False):
        '''
        Set conditions limiting usage of the assertion.
        
        C{tolerance} and C{length} are time quantity measured in seconds, it
        defines the time range in which the assertion is valid, it is computed
        as [now()-tolerance, now()+length+tolerance]. C{one_time_use} allows
        the issuer to limit caching of the assertion. C{proxy_count} specify
        how many proxy hop can be traversed before this assertion should lose
        any trust.
        
        @param length:  length of the range of time when the assertion is
            valid
        @param one_time_use:  can the assertion be kept or should it be used
            immediately
        '''
        _lasso.saml2_assertion_set_basic_conditions(self._cptr, tolerance, length, one_time_use)

    def addAudienceRestriction(self, providerID):
        '''
        Add an audience restriction to a L{Saml2Assertion}.
        
        @param providerId:  the provider id to restrict audience to
        '''
        _lasso.saml2_assertion_add_audience_restriction(self._cptr, str2lasso(providerID))

    def addProxyLimit(self, proxy_count = -1, proxy_audiences = None):
        '''
        A L{Saml2ProxyRestriction} to the conditions of consumption of
        C{self}.
        
        @param proxy_count:  the number of hops in the proxy chain, a negative
            value means no limitation
        @param proxy_audiences:  a list of audience restriction for newly
            issued assertion based on the C{self} assertion. An empty list
            means no audience restriction.
        '''
        _lasso.saml2_assertion_add_proxy_limit(self._cptr, proxy_count, proxy_audiences)

    def validateConditions(self, relaying_party_providerID = None):
        '''
        Check the validation of the assertion with respect to the conditions
        of consumption that it contains. System functions are used for getting
        current time and checking eventual time constraints.
        
        @param relaying_party_providerID:  the providerID of the current
            relaying party, use to check for audience restrictions.
        @return: LASSO_SAML2_ASSERTION_VALID if the assertion is valid,
            LASSO_SAML2_ASSERTION_INVALID is some check failed,
            LASSO_SAML2_ASSERTION_INDETERMINATE if somehting was impossible to
            eveluate.
        '''
        return _lasso.saml2_assertion_validate_conditions(self._cptr, str2lasso(relaying_party_providerID))

    def getIssuerProvider(self, server):
        '''
        Return the L{Provider} object for the provider who created this
        assertion.
        
        @param server:  a L{Server} object
        @return: a L{Provider} object, or None if the Issuer element is
            missing, or the given provider unknown to the L{Server} object.
        '''
        return cptrToPy(_lasso.saml2_assertion_get_issuer_provider(self._cptr, server and server._cptr))

    def addAttributeWithNode(self, name, nameformat, content):
        '''
        Add a new attribute declaration and set this node as the content.
        
        @param name:  the attribute name
        @param name_format:  the attribute name format (the namespace of the
            name)
        @param content:  a L{Node} object to put as content of the attribute
        @return: 0 if successful, an error code otherwise.
        '''
        rc = _lasso.saml2_assertion_add_attribute_with_node(self._cptr, str2lasso(name), str2lasso(nameformat), content and content._cptr)
        Error.raise_on_rc(rc)

    def getSubjectConfirmationData(self, create):
        return cptrToPy(_lasso.saml2_assertion_get_subject_confirmation_data(self._cptr, create))

    def getInResponseTo(self):
        '''
        Return the ID of the request this assertion respond to.
        
        @return: the InResponseTo attribute content of the
            SubjectConfirmationData if found
        '''
        return _lasso.saml2_assertion_get_in_response_to(self._cptr)

    def decryptSubject(self, server):
        '''
        Decipher (if needed) the EncryptedID of the Subject.
        
        @param server:  a L{Server} object
        @return: 0 if successful, an error code otherwise. See
            lasso_saml2_encrypted_element_server_decrypt().
        '''
        rc = _lasso.saml2_assertion_decrypt_subject(self._cptr, server and server._cptr)
        Error.raise_on_rc(rc)

    def validateTimeChecks(self, tolerance, now = 0):
        '''
        Check if the C{self} conditions about NotBefore and NotOnOrAfter are
        valid with respect to the C{now} time or the current time.
        C{tolerance} allows to loosely check for validatity, i.e. start time
        is decreased of C{tolerance} seconds and end time is increased of
        C{tolerance} seconds.
        
        @param tolerance:  a duration as seconds
        @param now:  the current time as seconds since EPOCH or 0 to use the
            system time.
        @return: a value among L{Saml2AssertionValidationState}.
        '''
        return _lasso.saml2_assertion_validate_time_checks(self._cptr, tolerance, now)

    def validateAudience(self, audience):
        '''
        Check if the C{self} is directed to a given C{audience}.
        
        @param audience:  the name of an entity
        @return: a value among L{Saml2AssertionValidationState} enumeration.
        '''
        return _lasso.saml2_assertion_validate_audience(self._cptr, str2lasso(audience))

    def hasOneTimeUse(self):
        '''
        Return whether this assertion has the OneTimeUse property.
        
        In this case the relaying party must add the assertion ID to a
        OneTimeUser cache and discards any assertion received in the future
        with the same ID.
        
        @return: TRUE if this assertion has the property OneTimeUse, FALSE
            otherwise.
        '''
        return _lasso.saml2_assertion_has_one_time_use(self._cptr)

    def allowsProxying(self):
        '''
        <para>Test whether this C{self} allows to mint new assertion on the
        basis of it.</para> <para>It verifies that the proxying count is
        positive (or absent).</para>
        
        @return: a value among L{Saml2AssertionValidationState} enumeration.
            #LASSO_SAML2_ASSERTION_INDETERMINATE usually means that an element
            was not conform to the XML Schema for SAML 2.0.
        '''
        return _lasso.saml2_assertion_allows_proxying(self._cptr)

    def allowsProxyingTo(self, audience = None):
        '''
        <para>Test whether this C{self} allows to mint new assertion on the
        basis of it targetted for C{audience}. </para><para>It verifies that
        if C{audience} is non-None it is part of the proxy Audience
        restriction. If C{audience} is None, it checks that no proxying
        Audience restriction is present.</para>
        
        @param audience:  the relaying party which we want to proxy to
        @return: a value among L{Saml2AssertionValidationState} enumeration.
            #LASSO_SAML2_ASSERTION_INDETERMINATE usually means that an element
            was not conform to the XML Schema for SAML 2.0.
        '''
        return _lasso.saml2_assertion_allows_proxying_to(self._cptr, str2lasso(audience))

    def setOneTimeUse(self, one_time_use):
        '''
        Set the one time use condition on this assertion.
        
        @param one_time_use:  is this assertion to be used one time only ?
        '''
        _lasso.saml2_assertion_set_one_time_use(self._cptr, one_time_use)

    inResponseTo = property(getInResponseTo)

class Saml2StatementAbstract(Node):
    def __init__(self, ):
        self._cptr = _lasso.saml2_statement_abstract_new()
        if self._cptr is None:
            raise Error('failed to create object')


class Saml2AttributeStatement(Saml2StatementAbstract):
    def __init__(self, ):
        self._cptr = _lasso.saml2_attribute_statement_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_attribute(self):
        t = _lasso.Saml2AttributeStatement_attribute_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_attribute(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2AttributeStatement_attribute_set(self._cptr, value)
    attribute = property(get_attribute, set_attribute)

    def get_encryptedAttribute(self):
        t = _lasso.Saml2AttributeStatement_encryptedAttribute_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_encryptedAttribute(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Saml2AttributeStatement_encryptedAttribute_set(self._cptr, value)
    encryptedAttribute = property(get_encryptedAttribute, set_encryptedAttribute)


class Saml2AuthnStatement(Saml2StatementAbstract):
    def __init__(self, ):
        self._cptr = _lasso.saml2_authn_statement_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_subjectLocality(self):
        t = _lasso.Saml2AuthnStatement_subjectLocality_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_subjectLocality(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2AuthnStatement_subjectLocality_set(self._cptr, value)
    subjectLocality = property(get_subjectLocality, set_subjectLocality)

    def get_authnContext(self):
        t = _lasso.Saml2AuthnStatement_authnContext_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_authnContext(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2AuthnStatement_authnContext_set(self._cptr, value)
    authnContext = property(get_authnContext, set_authnContext)

    def get_authnInstant(self):
        t = _lasso.Saml2AuthnStatement_authnInstant_get(self._cptr)
        return t;
    def set_authnInstant(self, value):
        value = str2lasso(value)
        _lasso.Saml2AuthnStatement_authnInstant_set(self._cptr, value)
    authnInstant = property(get_authnInstant, set_authnInstant)

    def get_sessionIndex(self):
        t = _lasso.Saml2AuthnStatement_sessionIndex_get(self._cptr)
        return t;
    def set_sessionIndex(self, value):
        value = str2lasso(value)
        _lasso.Saml2AuthnStatement_sessionIndex_set(self._cptr, value)
    sessionIndex = property(get_sessionIndex, set_sessionIndex)

    def get_sessionNotOnOrAfter(self):
        t = _lasso.Saml2AuthnStatement_sessionNotOnOrAfter_get(self._cptr)
        return t;
    def set_sessionNotOnOrAfter(self, value):
        value = str2lasso(value)
        _lasso.Saml2AuthnStatement_sessionNotOnOrAfter_set(self._cptr, value)
    sessionNotOnOrAfter = property(get_sessionNotOnOrAfter, set_sessionNotOnOrAfter)


class Saml2AuthzDecisionStatement(Saml2StatementAbstract):
    def __init__(self, ):
        self._cptr = _lasso.saml2_authz_decision_statement_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_action(self):
        t = _lasso.Saml2AuthzDecisionStatement_action_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_action(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2AuthzDecisionStatement_action_set(self._cptr, value)
    action = property(get_action, set_action)

    def get_evidence(self):
        t = _lasso.Saml2AuthzDecisionStatement_evidence_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_evidence(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Saml2AuthzDecisionStatement_evidence_set(self._cptr, value)
    evidence = property(get_evidence, set_evidence)

    def get_resource(self):
        t = _lasso.Saml2AuthzDecisionStatement_resource_get(self._cptr)
        return t;
    def set_resource(self, value):
        value = str2lasso(value)
        _lasso.Saml2AuthzDecisionStatement_resource_set(self._cptr, value)
    resource = property(get_resource, set_resource)

    def get_decision(self):
        t = _lasso.Saml2AuthzDecisionStatement_decision_get(self._cptr)
        return t;
    def set_decision(self, value):
        value = str2lasso(value)
        _lasso.Saml2AuthzDecisionStatement_decision_set(self._cptr, value)
    decision = property(get_decision, set_decision)


class Saml2OneTimeUse(Saml2ConditionAbstract):
    def __init__(self, ):
        self._cptr = _lasso.saml2_one_time_use_new()
        if self._cptr is None:
            raise Error('failed to create object')


class Samlp2Status(Node):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_status_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_statusCode(self):
        t = _lasso.Samlp2Status_statusCode_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_statusCode(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2Status_statusCode_set(self._cptr, value)
    statusCode = property(get_statusCode, set_statusCode)

    def get_statusMessage(self):
        t = _lasso.Samlp2Status_statusMessage_get(self._cptr)
        return t;
    def set_statusMessage(self, value):
        value = str2lasso(value)
        _lasso.Samlp2Status_statusMessage_set(self._cptr, value)
    statusMessage = property(get_statusMessage, set_statusMessage)

    def get_statusDetail(self):
        t = _lasso.Samlp2Status_statusDetail_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_statusDetail(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Samlp2Status_statusDetail_set(self._cptr, value)
    statusDetail = property(get_statusDetail, set_statusDetail)


class Samlp2AssertionIDRequest(Samlp2RequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_assertion_id_request_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_assertionIdRef(self):
        t = _lasso.Samlp2AssertionIDRequest_assertionIdRef_get(self._cptr)
        return t;
    def set_assertionIdRef(self, value):
        value = str2lasso(value)
        _lasso.Samlp2AssertionIDRequest_assertionIdRef_set(self._cptr, value)
    assertionIdRef = property(get_assertionIdRef, set_assertionIdRef)


class Samlp2ArtifactResolve(Samlp2RequestAbstract):
    def __init__(self, ):
        self._cptr = _lasso.samlp2_artifact_resolve_new()
        if self._cptr is None:
            raise Error('failed to create object')

    def get_artifact(self):
        t = _lasso.Samlp2ArtifactResolve_artifact_get(self._cptr)
        return t;
    def set_artifact(self, value):
        value = str2lasso(value)
        _lasso.Samlp2ArtifactResolve_artifact_set(self._cptr, value)
    artifact = property(get_artifact, set_artifact)


class Provider(Node):
    def __init__(self, role, metadata, public_key = None, ca_cert_chain = None):
        self._cptr = _lasso.provider_new(role, str2lasso(metadata), str2lasso(public_key), str2lasso(ca_cert_chain))
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromBuffer(cls, role, metadata, public_key = None, ca_cert_chain = None):
         return cptrToPy(_lasso.provider_new_from_buffer(role, str2lasso(metadata), str2lasso(public_key), str2lasso(ca_cert_chain)))

    @classmethod
    def newFromDump(cls, dump):
         return cptrToPy(_lasso.provider_new_from_dump(str2lasso(dump)))

    def get_providerId(self):
        t = _lasso.Provider_providerId_get(self._cptr)
        return t;
    def set_providerId(self, value):
        value = str2lasso(value)
        _lasso.Provider_providerId_set(self._cptr, value)
    providerId = property(get_providerId, set_providerId)

    def get_role(self):
        t = _lasso.Provider_role_get(self._cptr)
        return t;
    def set_role(self, value):
        _lasso.Provider_role_set(self._cptr, value)
    role = property(get_role, set_role)

    def get_metadataFilename(self):
        t = _lasso.Provider_metadataFilename_get(self._cptr)
        return t;
    def set_metadataFilename(self, value):
        value = str2lasso(value)
        _lasso.Provider_metadataFilename_set(self._cptr, value)
    metadataFilename = property(get_metadataFilename, set_metadataFilename)

    def get_publicKey(self):
        t = _lasso.Provider_publicKey_get(self._cptr)
        return t;
    def set_publicKey(self, value):
        value = str2lasso(value)
        _lasso.Provider_publicKey_set(self._cptr, value)
    publicKey = property(get_publicKey, set_publicKey)

    def get_caCertChain(self):
        t = _lasso.Provider_caCertChain_get(self._cptr)
        return t;
    def set_caCertChain(self, value):
        value = str2lasso(value)
        _lasso.Provider_caCertChain_set(self._cptr, value)
    caCertChain = property(get_caCertChain, set_caCertChain)

    def getAssertionConsumerServiceUrl(self, service_id = None):
        '''
        Extracts the AssertionConsumerServiceURL from the provider metadata
        descriptor.
        
        @param service_id:  the AssertionConsumerServiceID, None for default
        @return: the element value, None if the element was not found.
        '''
        return _lasso.provider_get_assertion_consumer_service_url(self._cptr, str2lasso(service_id))

    def getMetadataOne(self, name):
        '''
        Extracts the element C{name} from the provider metadata descriptor.
        
        @param name:  the element name
        @return: the element value, None if the element was not found.
        '''
        return _lasso.provider_get_metadata_one(self._cptr, str2lasso(name))

    def getMetadataList(self, name):
        '''
        Extracts zero to many elements from the provider metadata descriptor.
        
        @param name:  the element name
        @return: a #GList with the elements.  This GList is internally
            allocated and points to internally allocated strings.  It must not
            be freed, modified or stored.
        '''
        return _lasso.provider_get_metadata_list(self._cptr, str2lasso(name))

    def getFirstHttpMethod(self, remote_provider, protocol_type):
        '''
        Looks up and returns a L{HttpMethod} appropriate for performing the
        C{protocol_type} between C{self} and C{remote_provider}.
        
        @param remote_provider:  a L{Provider} depicting the remote provider
        @param protocol_type:  a Liberty profile
        @return: the L{HttpMethod}
        '''
        return _lasso.provider_get_first_http_method(self._cptr, remote_provider and remote_provider._cptr, protocol_type)

    def acceptHttpMethod(self, remote_provider, protocol_type, http_method, initiate_profile):
        '''
        Gets if C{http_method} is an appropriate method for the
        C{protocol_type} profile between C{self} and C{remote_provider}.
        
        @param remote_provider:  a L{Provider} depicting the remote provider
        @param protocol_type:  a Liberty profile type
        @param http_method:  an HTTP method
        @param initiate_profile:  whether C{self} initiates the profile
        @return: True if it is appropriate
        '''
        return _lasso.provider_accept_http_method(self._cptr, remote_provider and remote_provider._cptr, protocol_type, http_method, initiate_profile)

    def hasProtocolProfile(self, protocol_type, protocol_profile):
        '''
        Gets if C{self} supports C{protocol_profile}.
        
        @param protocol_type:  a Liberty profile type
        @param protocol_profile:  a fully-qualified Liberty profile
        @return: True if it is supported
        '''
        return _lasso.provider_has_protocol_profile(self._cptr, protocol_type, str2lasso(protocol_profile))

    def getBase64SuccinctId(self):
        '''
        Computes and returns the base64-encoded provider succinct ID.
        
        @return: the provider succinct ID.
        '''
        return _lasso.provider_get_base64_succinct_id(self._cptr)

    def getOrganization(self):
        '''
        Returns the provider metadata &lt;Organization&gt; XML node.
        
        @return: the &lt;Organization/&gt; node (libxml2 xmlNode*); or None if
            it is not found.  This xmlnode must be freed by the caller.
        '''
        return _lasso.provider_get_organization(self._cptr)

    def getProtocolConformance(self):
        '''
        Return the protocol conformance of the given provider, it should allow
        to switch behaviour of SP and IdP code toward a specific protocol. See
        also L{ProtocolConformance}.
        
        @return: a value in the L{ProtocolConformance} enumeration.
        '''
        return _lasso.provider_get_protocol_conformance(self._cptr)

    def setProtocolConformance(self, protocol_conformance):
        '''
        Normally the protocol conformance is set when the metadata for the
        provider is loaded because the metadata defines the type of server.
        However some L{Server} variants do not have metadata (e.g. ECP)
        therefore instead of loading the metadata it is necessary to
        explicitly set the protocol conformance because parts of the Lasso
        library dispatch based on the protocol conformance. Without the
        protocol conformance being set it is likely the wrong code will
        execute.
        
        **WARNING**, do not manually set the protocol conformance if metadata
        has been loaded, metadata is the final arbiter of protocol
        conformance.
        
        @param protocol_conformance:  L{ProtocolConformance} enumerated value.
        '''
        _lasso.provider_set_protocol_conformance(self._cptr, protocol_conformance)

    def setEncryptionMode(self, encryption_mode):
        '''
        Activate or desactivate encryption
        
        @param encryption_mode:  TRUE to activate, FALSE to desactivate
        '''
        _lasso.provider_set_encryption_mode(self._cptr, encryption_mode)

    def getEncryptionMode(self):
        '''
        Return the current encryption mode.
        
        @return: a value in the L{EncryptionMode} enumeration.
        '''
        return _lasso.provider_get_encryption_mode(self._cptr)

    def setEncryptionSymKeyType(self, encryption_sym_key_type):
        '''
        Set the type of the generated encryption symetric key
        
        @param encryption_sym_key_type:  enum type for generated symetric key
        '''
        _lasso.provider_set_encryption_sym_key_type(self._cptr, encryption_sym_key_type)

    def getDefaultNameIdFormat(self):
        '''
        If the provider has a list of supported name id formats in its
        metadatas, return the first one.
        
        @return: a NameIDFormat URI or None, the returned value must be freed
            by the caller.
        '''
        return _lasso.provider_get_default_name_id_format(self._cptr)

    def getSpNameQualifier(self):
        '''
        Return the entityID to use for qualifying NameIdentifier.
        
        @return: a private string or None. Do not keep a reference on this
            string or free it.
        '''
        return _lasso.provider_get_sp_name_qualifier(self._cptr)

    def verifySingleNodeSignature(self, node, id_attr_name):
        '''
        Return wheter the provider signed this node.
        
        @param node:  a L{Node} object, still having its originalXmlnode
            content, and containing an XML signature.
        @param id_attr_name:  the name of the ID attribute to lookup.
        @return: 0 if the node is signed by this provider, an error code
            otherwise.
        '''
        rc = _lasso.provider_verify_single_node_signature(self._cptr, node and node._cptr, str2lasso(id_attr_name))
        Error.raise_on_rc(rc)

    def getIdpSupportedAttributes(self):
        '''
        If the provider supports the IDP SSO role, then return the list of
        Attribute definition that this provider declared supporting.
        
        @return: a list of L{Saml2Attribute} or L{SamlAttribute}
        '''
        value = _lasso.provider_get_idp_supported_attributes(self._cptr)
        if value is not None:
            value = tuple([cptrToPy(x) for x in value])
        return value

    def getValidUntil(self):
        '''
        Return the time after which the metadata for this provider will become
        invalid. This is an ISO-8601 formatted string.
        
        @return: an internally allocated string, you can copy it but not store
            it.
        '''
        return _lasso.provider_get_valid_until(self._cptr)

    def getCacheDuration(self):
        '''
        Return the time during which the metadata for this provider can be
        kept.
        
        @return: an internally allocated string, you can copy it but not store
            it.
        '''
        return _lasso.provider_get_cache_duration(self._cptr)

    def getMetadataOneForRole(self, role, name):
        '''
        Return the given information extracted from the metadata of the given
        L{Provider} for the given C{role} descriptor.
        
        Retun value: a newly allocated string or None. If non-None must be
        freed by the caller.
        
        @param role:  a L{ProviderRole} value
        @param name:  a metadata information name
        '''
        return _lasso.provider_get_metadata_one_for_role(self._cptr, role, str2lasso(name))

    def getMetadataListForRole(self, role, name):
        '''
        Extracts zero to many elements from the C{self} descriptor for the
        given C{role}.
        
        @param role:  a L{ProviderRole} value
        @param name:  the element name
        @return: a #GList with the elements.  This GList is internally
            allocated and points to internally allocated strings.  It must not
            be freed, modified or stored.
        '''
        return _lasso.provider_get_metadata_list_for_role(self._cptr, role, str2lasso(name))

    def getMetadataKeysForRole(self, role):
        '''
        Returns the list of metadata keys existing for the given provider.
        
        @param role:  a L{ProviderRole} value
        @return: a newly allocated list of strings
        '''
        return _lasso.provider_get_metadata_keys_for_role(self._cptr, role)

    def getRoles(self):
        '''
        Return the bitmask of the supported roles.
        
        @return: a L{ProviderRole} enumeration value.
        '''
        return _lasso.provider_get_roles(self._cptr)

    def matchConformance(self, another_provider):
        '''
        Return whether the two provider support a same protocol. See also
        L{ProtocolConformance}.
        
        @param another_provider:  a L{Provider} object
        @return: TRUE or FALSE.
        '''
        return _lasso.provider_match_conformance(self._cptr, another_provider and another_provider._cptr)

    def setServerSigningKey(self, key):
        '''
        @param key:  a L{Key} object
        @return: 0 if successful, an error code otherwise.
        '''
        rc = _lasso.provider_set_server_signing_key(self._cptr, key and key._cptr)
        Error.raise_on_rc(rc)

    def addKey(self, key, after = False):
        '''
        Add a new signature key for validating message received from C{self}.
        If the key is used to improve verification time add it first with
        C{after} as true, it the key is ther for continuity of service (when
        doing a key rollover for example) at it last with C{after} as false.
        
        @param key:  a L{Key} object
        @param after:  add the key at the end of the list, not on front.
        @return: 0 if successful, an error code otherwise.
        '''
        rc = _lasso.provider_add_key(self._cptr, key and key._cptr, after)
        Error.raise_on_rc(rc)

    def verifySignature(self, message, id_attr_name, format):
        return _lasso.provider_verify_signature(self._cptr, str2lasso(message), str2lasso(id_attr_name), format)

    def saml2NodeEncrypt(self, lasso_node):
        '''
        Dump the node object to an XML fragment, then encrypt this fragment
        using encryption key of C{self}, then encapsulate the resulting
        encrypted content into a L{Saml2EncryptedElement}.
        
        @param lasso_node:  a L{Node} object
        @return: a newly created L{Saml2EncryptedElement} if successfull, None
            otherwise.
        '''
        return cptrToPy(_lasso.provider_saml2_node_encrypt(self._cptr, lasso_node and lasso_node._cptr))

    base64SuccinctId = property(getBase64SuccinctId)
    organization = property(getOrganization)
    protocolConformance = property(getProtocolConformance, setProtocolConformance)
    encryptionMode = property(getEncryptionMode, setEncryptionMode)
    defaultNameIdFormat = property(getDefaultNameIdFormat)
    spNameQualifier = property(getSpNameQualifier)
    idpSupportedAttributes = property(getIdpSupportedAttributes)
    validUntil = property(getValidUntil)
    cacheDuration = property(getCacheDuration)
    roles = property(getRoles)

class Server(Provider):
    def __init__(self, metadata = None, private_key = None, private_key_password = None, certificate = None):
        self._cptr = _lasso.server_new(str2lasso(metadata), str2lasso(private_key), str2lasso(private_key_password), str2lasso(certificate))
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromBuffers(cls, metadata, private_key_content = None, private_key_password = None, certificate_content = None):
         return cptrToPy(_lasso.server_new_from_buffers(str2lasso(metadata), str2lasso(private_key_content), str2lasso(private_key_password), str2lasso(certificate_content)))

    @classmethod
    def newFromDump(cls, dump):
         return cptrToPy(_lasso.server_new_from_dump(str2lasso(dump)))

    def get_providers(self):
        t = _lasso.Server_providers_get(self._cptr)
        if not t: return t
        d2 = {}
        for k, v in t.items():
            d2[k] = cptrToPy(v)
        t = frozendict(d2)
        return t;
    def set_providers(self, value):
        _lasso.Server_providers_set(self._cptr, value)
    providers = property(get_providers, set_providers)

    def get_privateKey(self):
        t = _lasso.Server_privateKey_get(self._cptr)
        return t;
    def set_privateKey(self, value):
        value = str2lasso(value)
        _lasso.Server_privateKey_set(self._cptr, value)
    privateKey = property(get_privateKey, set_privateKey)

    def get_privateKeyPassword(self):
        t = _lasso.Server_privateKeyPassword_get(self._cptr)
        return t;
    def set_privateKeyPassword(self, value):
        value = str2lasso(value)
        _lasso.Server_privateKeyPassword_set(self._cptr, value)
    privateKeyPassword = property(get_privateKeyPassword, set_privateKeyPassword)

    def get_certificate(self):
        t = _lasso.Server_certificate_get(self._cptr)
        return t;
    def set_certificate(self, value):
        value = str2lasso(value)
        _lasso.Server_certificate_set(self._cptr, value)
    certificate = property(get_certificate, set_certificate)

    def get_signatureMethod(self):
        t = _lasso.Server_signatureMethod_get(self._cptr)
        return t;
    def set_signatureMethod(self, value):
        _lasso.Server_signatureMethod_set(self._cptr, value)
    signatureMethod = property(get_signatureMethod, set_signatureMethod)

    def addProvider(self, role, metadata, public_key = None, ca_cert_chain = None):
        '''
        Creates a new L{Provider} and makes it known to the C{self}
        
        @param role:  provider role, identity provider or service provider
        @param metadata:  path to the provider metadata file
        @param public_key:  provider public key file (may be a certificate) or
            None
        @param ca_cert_chain:  provider CA certificate chain file or None
        '''
        rc = _lasso.server_add_provider(self._cptr, role, str2lasso(metadata), str2lasso(public_key), str2lasso(ca_cert_chain))
        Error.raise_on_rc(rc)

    def addProviderFromBuffer(self, role, metadata, public_key = None, ca_cert_chain = None):
        '''
        Creates a new L{Provider} and makes it known to the C{self}
        
        @param role:  provider role, identity provider or service provider
        @param metadata:  a string buffer containg the metadata file for a new
            provider
        @param public_key:  provider public key file (may be a certificate) or
            None
        @param ca_cert_chain:  provider CA certificate chain file or None
        '''
        rc = _lasso.server_add_provider_from_buffer(self._cptr, role, str2lasso(metadata), str2lasso(public_key), str2lasso(ca_cert_chain))
        Error.raise_on_rc(rc)

    def dump(self):
        '''
        Dumps C{self} content to an XML string.
        
        @return: the dump string.
        '''
        return _lasso.server_dump(self._cptr)

    def getProvider(self, providerID):
        '''
        Looks up for a L{Provider} whose ID is C{providerID} and returns it.
        
        @param providerID:  the provider ID
        @return: the L{Provider}, None if it was not found.  The L{Provider}
            is owned by Lasso and should not be freed.
        '''
        return cptrToPy(_lasso.server_get_provider(self._cptr, str2lasso(providerID)))

    def setEncryptionPrivateKey(self, filename_or_buffer = None):
        '''
        Load an encryption private key from a file and set it in the server
        object
        
        If C{filename_or_buffer} is None, it frees the currently setted key.
        
        @param filename_or_buffer:  file name of the encryption key to load or
            its content as a None-terminated string.
        @return: 0 on success; another value if an error occured. Deprecated:
            2.3: Use lasso_server_set_encryption_private_key_with_password()
            instead.
        '''
        rc = _lasso.server_set_encryption_private_key(self._cptr, str2lasso(filename_or_buffer))
        Error.raise_on_rc(rc)

    def loadAffiliation(self, filename):
        '''
        Load an affiliation metadata file into C{self}; this must be called
        after providers have been added to C{self}.
        
        @param filename:  file name of the affiliation metadata to load
        '''
        rc = _lasso.server_load_affiliation(self._cptr, str2lasso(filename))
        Error.raise_on_rc(rc)

    def setEncryptionPrivateKeyWithPassword(self, filename_or_buffer = None, password = None):
        '''
        Load an encryption private key from a file and set it in the server
        object. If C{password} is non-None try to decrypt the key with it.
        
        If C{filename_or_buffer} is None, it frees the currently setted key.
        
        @param filename_or_buffer:  file name of the encryption key to load or
            its content as a None-terminated string.
        @param password:  an optional password to decrypt the encryption key.
        @return: 0 on success; another value if an error occured. Since: 2.3
        '''
        rc = _lasso.server_set_encryption_private_key_with_password(self._cptr, str2lasso(filename_or_buffer), str2lasso(password))
        Error.raise_on_rc(rc)

    def loadMetadata(self, role, federation_file, trusted_roots, blacklisted_entity_ids, flags):
        '''
        Load all the SAML 2.0 entities from C{federation_file} which contains
        a declaration for C{role}. If C{trusted_roots} is non-None, use it to
        check a signature on the metadata file, otherwise ignore signature
        validation.
        
        @param role:  a L{ProviderRole} value
        @param federation_file:  path to a SAML 2.0 metadata file
        @param trusted_roots:  a PEM encoded files containing the certificates
            to check signatures on the metadata file (optional)
        @param blacklisted_entity_ids:  a list of EntityID which should not be
            loaded, can be None.
        @param loaded_entity_ids:  an output parameter for the list of the
            loaded EntityID, can be None.
        @param flags:  flags modifying the behaviour for checking signatures
            on EntityDescriptor and EntitiesDescriptors nodes.
        @return: 0 on success, an error code otherwise, among: <itemizedlist>
            <listitem><para> LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if server
            is not a L{Server} object or C{role} is not a valid role value,
            </para></listitem> <listitem><para>
            LASSO_DS_ERROR_CA_CERT_CHAIN_LOAD_FAILED if the C{trusted_root}
            file cannot be loaded, </para></listitem> </itemizedlist>
        '''
        _loaded_entity_ids_out = list((None,))
        rc = _lasso.server_load_metadata(self._cptr, role, str2lasso(federation_file), str2lasso(trusted_roots), blacklisted_entity_ids, _loaded_entity_ids_out, flags)
        Error.raise_on_rc(rc)
        return _loaded_entity_ids_out[0]

    def addProvider2(self, provider):
        '''
        Add C{provider} to the list of known providers object of C{self}.
        
        Return 0 if successful, LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ
        otherwise.
        
        @param provider:  a L{Provider} object
        '''
        rc = _lasso.server_add_provider2(self._cptr, provider and provider._cptr)
        Error.raise_on_rc(rc)

    def getEndpointUrlById(self, provider_id, endpoint_description):
        '''
        Locate the provider in the server's list of providers, then select an
        endpoint given the C{endpoint_description} and return than endpoint's
        URL. If the provider cannot be found or if the provider does not have
        a matching endpoint None will be returned.
        
        Returns: url (must be freed by caller)
        
        @param provider_id:  the EntityID whose endpoints will be examined.
        @param endpoint_description:  string describing criteria used to
            select endpoint.
        '''
        return _lasso.server_get_endpoint_url_by_id(self._cptr, str2lasso(provider_id), str2lasso(endpoint_description))

    def getFilteredProviderList(self, role, protocol_type, http_method):
        '''
        Iterate over the C{self} providers and build a list of provider
        EntityID's who have the specified C{role} and at least one endpoint
        matching the C{protocol_type} and C{http_method}. Return a #GList list
        of EntityID's at the C{provider_list} pointer. The caller is
        responsible for freeing the C{provider_list} by calling
        lasso_release_list_of_strings().
        
        @param role:  each returned provider will match this L{ProviderRole}
        @param protocol_type:  provider must have endpoint matching
            L{MdProtocolType} and C{http_method}
        @param http_method:  provider must have endpoint matching
            L{HttpMethod} and C{protocol_type}
        @return: #GList of matching provider EntityID's returned here.
        '''
        return _lasso.server_get_filtered_provider_list(self._cptr, role, protocol_type, http_method)

    def saml2AssertionSetupSignature(self, saml2_assertion):
        '''
        Configure signature on a saml2:Assertion element.
        
        @param saml2_assertion:  a L{Saml2Assertion} object
        @return: 0 if successfull, an error code otherwise.
        '''
        rc = _lasso.server_saml2_assertion_setup_signature(self._cptr, saml2_assertion and saml2_assertion._cptr)
        Error.raise_on_rc(rc)


class Identity(Node):
    def __init__(self, ):
        self._cptr = _lasso.identity_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromDump(cls, dump):
         return cptrToPy(_lasso.identity_new_from_dump(str2lasso(dump)))

    def get_federations(self):
        t = _lasso.Identity_federations_get(self._cptr)
        if not t: return t
        d2 = {}
        for k, v in t.items():
            d2[k] = cptrToPy(v)
        t = frozendict(d2)
        return t;
    def set_federations(self, value):
        _lasso.Identity_federations_set(self._cptr, value)
    federations = property(get_federations, set_federations)

    def get_isDirty(self):
        t = _lasso.Identity_isDirty_get(self._cptr)
        return t;
    def set_isDirty(self, value):
        _lasso.Identity_isDirty_set(self._cptr, value)
    isDirty = property(get_isDirty, set_isDirty)

    def getFederation(self, providerID):
        '''
        Looks up and returns the L{Federation} for this provider ID.
        
        @param providerID:  the provider ID
        @return: the L{Federation}; or None if it didn't exist.  The
            L{Federation} is internally allocated.  It must not be freed,
            modified or stored.
        '''
        return cptrToPy(_lasso.identity_get_federation(self._cptr, str2lasso(providerID)))

    def dump(self):
        '''
        Dumps C{self} content to an XML string.
        
        @return: the dump string.
        '''
        return _lasso.identity_dump(self._cptr)


class Profile(Node):
    def get_server(self):
        t = _lasso.Profile_server_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_server(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Profile_server_set(self._cptr, value)
    server = property(get_server, set_server)

    def get_request(self):
        t = _lasso.Profile_request_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_request(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Profile_request_set(self._cptr, value)
    request = property(get_request, set_request)

    def get_response(self):
        t = _lasso.Profile_response_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_response(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Profile_response_set(self._cptr, value)
    response = property(get_response, set_response)

    def get_nameIdentifier(self):
        t = _lasso.Profile_nameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_nameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Profile_nameIdentifier_set(self._cptr, value)
    nameIdentifier = property(get_nameIdentifier, set_nameIdentifier)

    def get_remoteProviderId(self):
        t = _lasso.Profile_remoteProviderId_get(self._cptr)
        return t;
    def set_remoteProviderId(self, value):
        value = str2lasso(value)
        _lasso.Profile_remoteProviderId_set(self._cptr, value)
    remoteProviderId = property(get_remoteProviderId, set_remoteProviderId)

    def get_msgUrl(self):
        t = _lasso.Profile_msgUrl_get(self._cptr)
        return t;
    def set_msgUrl(self, value):
        value = str2lasso(value)
        _lasso.Profile_msgUrl_set(self._cptr, value)
    msgUrl = property(get_msgUrl, set_msgUrl)

    def get_msgBody(self):
        t = _lasso.Profile_msgBody_get(self._cptr)
        return t;
    def set_msgBody(self, value):
        value = str2lasso(value)
        _lasso.Profile_msgBody_set(self._cptr, value)
    msgBody = property(get_msgBody, set_msgBody)

    def get_msgRelayState(self):
        t = _lasso.Profile_msgRelayState_get(self._cptr)
        return t;
    def set_msgRelayState(self, value):
        value = str2lasso(value)
        _lasso.Profile_msgRelayState_set(self._cptr, value)
    msgRelayState = property(get_msgRelayState, set_msgRelayState)

    def getIdentity(self):
        '''
        Gets the identity bound to C{self}.
        
        @return: the identity or None if it none was found.  The L{Identity}
            object is internally allocated and must not be freed by the
            caller.
        '''
        return cptrToPy(_lasso.profile_get_identity(self._cptr))

    def getSession(self):
        '''
        Gets the session bound to C{self}.
        
        @return: the session or None if it none was found.  The L{Session}
            object is internally allocated and must not be freed by the
            caller.
        '''
        return cptrToPy(_lasso.profile_get_session(self._cptr))

    def hasDirtyIdentity(self):
        '''
        Checks whether identity has been modified (and should therefore be
        saved).
        
        @return: True if identity has changed
        '''
        return _lasso.profile_has_dirty_identity(self._cptr)

    def hasDirtySession(self):
        '''
        Checks whether session has been modified (and should therefore be
        saved).
        
        @return: True if session has changed
        '''
        return _lasso.profile_has_dirty_session(self._cptr)

    def setIdentityFromDump(self, dump):
        '''
        Builds a new L{Identity} object from XML dump and binds it to C{self}.
        
        @param dump:  XML identity dump
        '''
        rc = _lasso.profile_set_identity_from_dump(self._cptr, str2lasso(dump))
        Error.raise_on_rc(rc)

    def setSessionFromDump(self, dump):
        '''
        Builds a new L{Session} object from XML dump and binds it to C{self}.
        
        @param dump:  XML session dump
        '''
        rc = _lasso.profile_set_session_from_dump(self._cptr, str2lasso(dump))
        Error.raise_on_rc(rc)

    def getFederationNameIdentifier(self):
        '''
        Looks up appropriate federation in object and gets the service
        provider name identifier (which is actually a L{SamlNameIdentifier} in
        ID-FF 1.2 and L{Saml2NameID} in SAML 2.0).
        
        @return: the name identifier or None if none was found.  The L{Node}
            object is internally allocated and must not be freed by the
            caller.
        '''
        return cptrToPy(_lasso.profile_get_federation_nameIdentifier(self._cptr))

    def getArtifact(self):
        '''
        Return the artifact token
        
        @return: a newly allocated string or None.
        '''
        return _lasso.profile_get_artifact(self._cptr)

    def getArtifactMessage(self):
        '''
        Return the artifact message.
        
        @return: a newly allocated string or None
        '''
        return _lasso.profile_get_artifact_message(self._cptr)

    def setArtifactMessage(self, message):
        '''
        Set C{message} as the content for the ArtifactResolve response.
        
        @param message:  the artifact message content
        '''
        _lasso.profile_set_artifact_message(self._cptr, str2lasso(message))

    def setSignatureHint(self, signature_hint):
        '''
        By default each profile will choose to sign or not its messages, this
        method allow to force or forbid the signature of messages, on a per
        transaction basis.
        
        @param signature_hint:  wheter next produced messages should be signed
            or not (or let Lasso choose from implicit information).
        '''
        _lasso.profile_set_signature_hint(self._cptr, signature_hint)

    def getSignatureHint(self):
        '''
        Return the value of the signature hint attribute (see
        lasso_profile_set_signature_hint()).
        
        @return: a value in the enum type L{ProfileSignatureHint}.
        '''
        return _lasso.profile_get_signature_hint(self._cptr)

    def setSoapFaultResponse(self, faultcode, faultstring = None, details = None):
        '''
        Set the response to a SOAP fault, using C{faultcode}, C{faultstring},
        and C{details} to initialize it.
        
        @param faultcode:  the code for the SOAP fault
        @param faultstring:  the description for the SOAP fault
        @param details:  a list of nodes to add as details
        @return: 0 if successful, an error code otherwise.
        '''
        rc = _lasso.profile_set_soap_fault_response(self._cptr, str2lasso(faultcode), str2lasso(faultstring), details)
        Error.raise_on_rc(rc)

    def setSignatureVerifyHint(self, signature_verify_hint):
        '''
        By default each profile will choose to verify or not its messages,
        this method allow to force or forbid the signature of messages, on a
        per transaction basis.
        
        @param signature_verify_hint:  whether next received message
            signatures should be checked or not (or let Lasso choose from
            implicit information).
        '''
        _lasso.profile_set_signature_verify_hint(self._cptr, signature_verify_hint)

    def getSignatureVerifyHint(self):
        '''
        Return the value of the signature verify hint attribute (see
        lasso_profile_set_signature_verify_hint()).
        
        @return: a value in the enum type L{ProfileSignatureVerifyHint}.
        '''
        return _lasso.profile_get_signature_verify_hint(self._cptr)

    def ssoRoleWith(self, remote_provider_id):
        '''
        Returns whether the current provider is a service provider relatively
        to another provider. It uses the L{Profile}.identity to find if a
        federation qualifier by the given provider exists or the reverse.
        
        @param remote_provider_id:  the identifier of a provider
        @return: #LASSO_PROVIDER_ROLE_NONE if nothing can be said,
            #LASSO_PROVIDER_ROLE_SP if a federation qualifier by
            C{remote_provider_id} exists or #LASSO_PROVIDER_ROLE_IDP if a
            federation qualifier by our own L{Provider}.ProviderID exists.
        '''
        return _lasso.profile_sso_role_with(self._cptr, str2lasso(remote_provider_id))

    def getSignatureStatus(self):
        '''
        Returns the signature status from the last parsed message.
        
        @return: 0 if no error from signature checking occurred, an error code
            otherwise.
        '''
        rc = _lasso.profile_get_signature_status(self._cptr)
        Error.raise_on_rc(rc)

    def getMessageId(self):
        '''
        Return the messge ID.
        
        @return: a newly allocated string or None
        '''
        return _lasso.profile_get_message_id(self._cptr)

    def setMessageId(self, message_id):
        '''
        Set C{message_id} for the current conversation
        
        @param message_id:  the message ID
        '''
        _lasso.profile_set_message_id(self._cptr, str2lasso(message_id))

    def getIdpList(self):
        '''
        Return the messge ID.
        
        @return: a L{Node}, when using SAML 2.0 a L{Samlp2IDPList}, when using
            ID-FF a L{LibIDPList}.
        '''
        return cptrToPy(_lasso.profile_get_idp_list(self._cptr))

    def setIdpList(self, idp_list):
        '''
        Set C{idp_list} for the current conversation
        
        @param idp_list:  a L{Node}, when using SAML 2.0 a L{Samlp2IDPList},
            when using ID-FF a L{LibIDPList}.
        '''
        _lasso.profile_set_idp_list(self._cptr, idp_list and idp_list._cptr)

    identity = property(getIdentity)
    session = property(getSession)
    federationNameIdentifier = property(getFederationNameIdentifier)
    artifact = property(getArtifact)
    artifactMessage = property(getArtifactMessage, setArtifactMessage)
    signatureHint = property(getSignatureHint, setSignatureHint)
    signatureVerifyHint = property(getSignatureVerifyHint, setSignatureVerifyHint)
    signatureStatus = property(getSignatureStatus)
    messageId = property(getMessageId, setMessageId)
    idpList = property(getIdpList, setIdpList)

class Logout(Profile):
    def __init__(self, server):
        self._cptr = _lasso.logout_new(server and server._cptr)
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromDump(cls, server, dump):
         return cptrToPy(_lasso.logout_new_from_dump(server and server._cptr, str2lasso(dump)))

    def buildRequestMsg(self):
        '''
        Builds the logout request message.
        
        It gets the HTTP method retrieved to send the request and:
        
         - if it is a SOAP method, then it builds the logout request SOAP
           message,   sets the msg_body attribute, gets the single logout
           service url and sets   C{msg_url} in the logout object.
        
         - if it is a HTTP-Redirect method, then it builds the logout request
           QUERY   message, builds the logout request url, sets C{msg_url} in
           the logout   request url, sets C{msg_body} to None.
        
        If private key and certificate are set in server object it will also
        signs the message (either with X509 if SOAP or with a simple signature
        for query strings).
        '''
        rc = _lasso.logout_build_request_msg(self._cptr)
        Error.raise_on_rc(rc)

    def buildResponseMsg(self):
        '''
        Builds the logout response message.
        
        It gets the request message method and:
        
         - if it is a SOAP method, then it builds the logout response SOAP
           message,    sets the msg_body attribute, gets the single logout
           service return url    and sets C{msg_url} in the logout object.
        
         - if it is a HTTP-Redirect method, then it builds the logout response
           QUERY message,    builds the logout response url, sets C{msg_url}
           with the logout response url,    sets C{msg_body} to None
        
        If private key and certificate are set in server object it will also
        signs the message (either with X509 if SOAP or with a simple signature
        for query strings).
        '''
        rc = _lasso.logout_build_response_msg(self._cptr)
        Error.raise_on_rc(rc)

    def dump(self):
        '''
        Dumps C{self} content to an XML string.
        
        @return: the dump string.
        '''
        return _lasso.logout_dump(self._cptr)

    def getNextProviderId(self):
        '''
        Returns the provider id from providerID_index in list of providerIDs
        in principal session with the exception of initial service provider
        ID.
        
        @return: a newly allocated string or None
        '''
        return _lasso.logout_get_next_providerID(self._cptr)

    def initRequest(self, remote_providerID = None, request_method = HTTP_METHOD_ANY):
        '''
        Initializes a new SLO request.
        
        @param remote_providerID:  the providerID of the identity provider.
            If None the first identity provider is used.
        @param request_method:  if set, then it get the protocol profile in
            metadata corresponding of this HTTP request method.
        '''
        rc = _lasso.logout_init_request(self._cptr, str2lasso(remote_providerID), request_method)
        Error.raise_on_rc(rc)

    def processRequestMsg(self, request_msg):
        '''
        Processes a SLO LogoutRequest message.  Rebuilds a request object from
        the message and optionally verifies its signature.
        
        @param request_msg:  the logout request message
        '''
        rc = _lasso.logout_process_request_msg(self._cptr, str2lasso(request_msg))
        Error.raise_on_rc(rc)

    def processResponseMsg(self, response_msg):
        '''
        Parses the response message and builds the response object.
        
        Checks the status code value and if it is not success, then if the
        local provider is a Service Provider and response method is SOAP, then
        builds a new logout request message for HTTP Redirect / GET method and
        returns the error code LASSO_LOGOUT_ERROR_UNSUPPORTED_PROFILE.
        
        If it is a SOAP method or, IDP type and http method is Redirect/GET,
        then removes assertion.
        
        If local server is an Identity Provider and if there is no more
        assertion (Identity Provider has logged out every Service Providers),
        then restores the initial response.
        
        @param response_msg:  the response message
        '''
        rc = _lasso.logout_process_response_msg(self._cptr, str2lasso(response_msg))
        Error.raise_on_rc(rc)

    def resetProviderIdIndex(self):
        '''
        Reset the providerID_index attribute (set to 0).
        '''
        rc = _lasso.logout_reset_providerID_index(self._cptr)
        Error.raise_on_rc(rc)

    def validateRequest(self):
        '''
        
        
         - Sets the remote provider id
        
         - Sets a logout response with status code value to success.
        
         - Checks current signature status, if verification failed, stop
           processing   and set the status code value to failure.
        
         - Verifies federation and authentication.
        
         - If the request http method is a SOAP method, then verifies every
           other   Service Providers supports SOAP method : if not, then sets
           status code   value to UnsupportedProfile and returns a code error
           with   LASSO_LOGOUT_ERROR_UNSUPPORTED_PROFILE.
        
         - Every tests are ok, then removes assertion.
        
         - If local server is an Identity Provider and if there is more than
           one   Service Provider (except the initial Service Provider), then
           saves the   initial request, response and remote provider id.
        
        @return: 0 on success; or LASSO_PROFILE_ERROR_MISSING_REQUEST if no
            request has been found -- usually means that
            lasso_logout_process_request_msg was not called,
            LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND if the requesting provider
            is not known to the server object,
            LASSO_PROFILE_ERROR_BUILDING_RESPONSE_FAILED if creation of the
            response object failed,
            LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND if the request do
            not contain a NameID element,
            LASSO_PROFILE_ERROR_SESSION_NOT_FOUND if the logout profile object
            do not contain a session object,
            LASSO_PROFILE_ERROR_MISSING_ASSERTION if no assertion from the
            requesting provider was found,
            LASSO_PROFILE_ERROR_IDENTITY_NOT_FOUND if the logout profile
            object do not contain an identity object,
            LASSO_PROFILE_ERROR_FEDERATION_NOT_FOUND if no federation for the
            requesting provider was found,
            LASSO_LOGOUT_ERROR_UNSUPPORTED_PROFILE if the requested HTTP
            method is not supported by all the remote provider of the current
            session.
        '''
        rc = _lasso.logout_validate_request(self._cptr)
        Error.raise_on_rc(rc)

    nextProviderId = property(getNextProviderId)

class NameRegistration(Profile):
    def __init__(self, server):
        self._cptr = _lasso.name_registration_new(server and server._cptr)
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromDump(cls, server, dump):
         return cptrToPy(_lasso.name_registration_new_from_dump(server and server._cptr, str2lasso(dump)))

    def get_oldNameIdentifier(self):
        t = _lasso.NameRegistration_oldNameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_oldNameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.NameRegistration_oldNameIdentifier_set(self._cptr, value)
    oldNameIdentifier = property(get_oldNameIdentifier, set_oldNameIdentifier)

    def buildRequestMsg(self):
        '''
        Builds a register name identifier request message.
        
        It gets the register name identifier protocol profile and:
        
         - if it is a SOAP method, then it builds the register name identifier
           request SOAP message, optionally signs his node, sets C{msg_body},
           gets the SoapEndpoint url and sets C{msg_url}.
        
         - if it is a HTTP-Redirect method, then it builds the register name
           identifier request QUERY message (optionally signs the request
           message),   builds the request url with register name identifier
           url with register   name identifier service url, sets C{msg_url} in
           the register name   identifier object, sets C{msg_body} to None.
        '''
        rc = _lasso.name_registration_build_request_msg(self._cptr)
        Error.raise_on_rc(rc)

    def buildResponseMsg(self):
        '''
        Builds the register name idendifier response message.
        
        It gets the request message method and:
        
         - if it is a SOAP method, then it builds the response SOAP message,
           sets    the msg_body attribute, gets the register name identifier
           service return    url and sets C{msg_url} of the object.
        
         - if it is a HTTP-Redirect method, then it builds the response QUERY
           message, builds the response url, sets C{msg_url} with the response
           url    and sets the msg_body with None
        
        If private key and certificate are set in server object it will also
        signs the message (either with X509 if SOAP or with a simple signature
        for query strings).
        '''
        rc = _lasso.name_registration_build_response_msg(self._cptr)
        Error.raise_on_rc(rc)

    def dump(self):
        '''
        Dumps C{self} content to an XML string.
        
        @return: the dump string.
        '''
        return _lasso.name_registration_dump(self._cptr)

    def initRequest(self, remote_providerID, http_method = HTTP_METHOD_ANY):
        '''
        Initializes a new lib:RegisterNameIdentifierRequest request; it sets
        C{self}->nameIdentifier to the new name identifier and
        C{self}->oldNameIdentifier to the old one.
        
        @param remote_providerID:  the providerID of the identity provider.
        @param http_method:  if set, then it get the protocol profile in
            metadata corresponding of this HTTP request method.
        '''
        rc = _lasso.name_registration_init_request(self._cptr, str2lasso(remote_providerID), http_method)
        Error.raise_on_rc(rc)

    def processRequestMsg(self, request_msg):
        '''
        Processes a lib:RegisterNameIdentifierRequest message.  Rebuilds a
        request object from the message and optionally verifies its signature.
        Sets profile->nameIdentifier to local name identifier.  If it changed
        (when this is IdP-initiated and there was no previously defined local
        name identifier) profile->nameIdentifier will be the new one and
        profile->oldNameIdentiifer the old one.
        
        @param request_msg:  the register name identifier request message
        '''
        rc = _lasso.name_registration_process_request_msg(self._cptr, str2lasso(request_msg))
        Error.raise_on_rc(rc)

    def processResponseMsg(self, response_msg):
        '''
        Processes a lib:RegisterNameIdentifierResponse message.  Rebuilds a
        response object from the message and optionally verifies its
        signature.
        
        If the response depicts Success it will also update Principal
        federation.
        
        @param response_msg:  the register name identifier response message
        '''
        rc = _lasso.name_registration_process_response_msg(self._cptr, str2lasso(response_msg))
        Error.raise_on_rc(rc)

    def validateRequest(self):
        '''
        Checks profile request with regards to message status and principal
        federations, update them accordingly and prepares a
        lib:RegisterNameIdentifierResponse accordingly.
        '''
        rc = _lasso.name_registration_validate_request(self._cptr)
        Error.raise_on_rc(rc)


class Defederation(Profile):
    def __init__(self, server):
        self._cptr = _lasso.defederation_new(server and server._cptr)
        if self._cptr is None:
            raise Error('failed to create object')

    def buildNotificationMsg(self):
        '''
        Builds the federation termination notification message.
        
        It gets the federation termination notification protocol profile and:
        
         - if it is a SOAP method, then it builds the federation termination
           notification SOAP message, optionally signs the notification node,
           sets   C{msg_body}, gets the SoapEndpoint url and sets C{msg_url}
           of the federation   termination object.
        
         - if it is a HTTP-Redirect method, then it builds the federation
           termination   notification QUERY message (optionally signs the
           notification message),   builds the federation termination
           notification url with federation   termination service url, sets
           C{msg_url} in the federation termination   object, sets C{msg_body}
           to None.
        '''
        rc = _lasso.defederation_build_notification_msg(self._cptr)
        Error.raise_on_rc(rc)

    def initNotification(self, remote_providerID = None, http_method = HTTP_METHOD_ANY):
        '''
        Sets a new federation termination notification to the remote provider
        id with the provider id of the requester (from the server object) and
        the name identifier of the federated principal.
        
        @param remote_providerID:  the provider id of the federation
            termination notified provider.
        @param http_method:  the HTTP method to send the message.
        '''
        rc = _lasso.defederation_init_notification(self._cptr, str2lasso(remote_providerID), http_method)
        Error.raise_on_rc(rc)

    def processNotificationMsg(self, notification_msg):
        '''
        Processes a lib:FederationTerminationNotification message.  Rebuilds a
        request object from the message and optionally verifies its signature.
        
        Set the msg_nameIdentifier attribute with the NameIdentifier content
        of the notification object and optionally set the msg_relayState
        attribute with the RelayState content of the notification object.
        
        @param notification_msg:  the federation termination notification
            message
        '''
        rc = _lasso.defederation_process_notification_msg(self._cptr, str2lasso(notification_msg))
        Error.raise_on_rc(rc)

    def validateNotification(self):
        '''
        Checks notification with regards to message status and principal
        federations; update them accordingly.
        '''
        rc = _lasso.defederation_validate_notification(self._cptr)
        Error.raise_on_rc(rc)


class Login(Profile):
    def __init__(self, server):
        self._cptr = _lasso.login_new(server and server._cptr)
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromDump(cls, server, dump):
         return cptrToPy(_lasso.login_new_from_dump(server and server._cptr, str2lasso(dump)))

    def get_protocolProfile(self):
        t = _lasso.Login_protocolProfile_get(self._cptr)
        return t;
    def set_protocolProfile(self, value):
        _lasso.Login_protocolProfile_set(self._cptr, value)
    protocolProfile = property(get_protocolProfile, set_protocolProfile)

    def get_assertionArtifact(self):
        t = _lasso.Login_assertionArtifact_get(self._cptr)
        return t;
    def set_assertionArtifact(self, value):
        value = str2lasso(value)
        _lasso.Login_assertionArtifact_set(self._cptr, value)
    assertionArtifact = property(get_assertionArtifact, set_assertionArtifact)

    def acceptSso(self):
        '''
        Gets the assertion of the response and adds it to the L{Session}
        object. Builds a federation with the 2 name identifiers of the
        assertion and adds it into the identity. If the session or the
        identity are None, they are created.
        
        @return: 0 on success; or <itemizedlist> <listitem><para>
            #LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if login is not a L{Login}
            object, </para></listitem> <listitem><para>
            #LASSO_PROFILE_ERROR_MISSING_RESPONSE if no response is present in
            the login profile object; usually because no call to
            lasso_login_process_authn_response_msg was done;
            </para></listitem> <listitem><para>
            #LASSO_PROFILE_ERROR_MISSING_ASSERTION if the response does not
            contain an assertion, </para></listitem> <listitem><para>
            #LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND if the assertion
            does not contain a NameID element, </para></listitem>
            <listitem><para> #LASSO_PROFILE_ERROR_MISSING_NAME_IDENTIFIER same
            as #LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND,
            </para></listitem> <listitem><para>
            #LASSO_LOGIN_ERROR_ASSERTION_REPLAY if the assertion has already
            been used. </para></listitem> </itemizedlist>
        '''
        rc = _lasso.login_accept_sso(self._cptr)
        Error.raise_on_rc(rc)

    def buildArtifactMsg(self, http_method):
        '''
        Builds a SAML artifact. Depending of the HTTP method, the data for the
        sending of the artifact are stored in C{msg_url} (REDIRECT) or
        C{msg_url}, C{msg_body} and C{msg_relayState} (POST).
        
        @param http_method:  the HTTP method to send the artifact (REDIRECT or
            POST)
        @return: 0 on success; or <itemizedlist> <listitem><para>
            LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if login is not a L{Login}
            object, </para></listitem> <listitem><para>
            LASSO_PROFILE_ERROR_MISSING_REMOTE_PROVIDERID if no remote
            provider ID was setup in the login profile object, it's usually
            done by lasso_login_process_authn_request_msg, </para></listitem>
            <listitem><para> LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD if the
            HTTP method is neither LASSO_HTTP_METHOD_REDIRECT or
            LASSO_HTTP_METHOD_POST (ID-FF 1.2 case) or neither
            LASSO_HTTP_METHOD_ARTIFACT_GET or LASSO_HTTP_METHOD_ARTIFACT_POST
            (SAML 2.0 case) for SAML 2.0), </para></listitem> <listitem><para>
            LASSO_PROFILE_ERROR_INVALID_PROTOCOLPROFILE if the current
            protocolProfile is not </para></listitem> <listitem><para>
            LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_ART (only for ID-FF 1.2),
            </para></listitem> <listitem><para>
            LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND if the remote provider is
            not known to our server object which impeach us to find a service
            endpoint, </para></listitem> <listitem><para>
            LASSO_PROFILE_ERROR_MISSING_RESPONSE if the response object is
            missing, </para></listitem> <listitem><para>
            LASSO_PROFILE_ERROR_MISSING_STATUS_CODE if the response object is
            missing a status code, </para></listitem> /itemizedlist>
        '''
        rc = _lasso.login_build_artifact_msg(self._cptr, http_method)
        Error.raise_on_rc(rc)

    def buildAssertion(self, authenticationMethod = None, authenticationInstant = None, reauthenticateOnOrAfter = None, notBefore = None, notOnOrAfter = None):
        '''
        Builds an assertion and stores it in profile session.
        C{authenticationInstant}, reauthenticateOnOrAfter, C{notBefore} and
        C{notOnOrAfter} may be None.  If C{authenticationInstant} is None, the
        current time will be used.  Time values must be encoded in UTC.
        
        Construct the authentication assertion for the response. It must be
        called after validating the request using
        lasso_login_validate_request_msg(). The created assertion is accessed
        using lasso_login_get_assertion().
        
        @param authenticationMethod:  the authentication method
        @param authenticationInstant:  the time at which the authentication
            took place
        @param notBefore:  the earliest time instant at which the assertion is
            valid
        @param notOnOrAfter:  the time instant at which the assertion has
            expired
        @return: 0 on success; or <itemizedlist> <listitem><para>
            #LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if login is not a L{Login}
            object, </para></listitem> <listitem><para>
            #LASSO_PROFILE_ERROR_IDENTITY_NOT_FOUND if no identity object was
            found in the login profile object. </para></listitem>
            <listitem><para> #LASSO_PROFILE_ERROR_MISSING_RESPONSE if no
            response object is present ( it is normally initialized by
            lasso_login_process_authn_request_msg() ) </para></listitem>
            <listitem><para> #LASSO_PROFILE_ERROR_FEDERATION_NOT_FOUND if a
            #LASSO_SAML2_NAME_IDENTIFIER_FORMAT_PERSISTENT or
            #LASSO_SAML2_NAME_IDENTIFIER_FORMAT_ENCRYPTED NameID format is
            asked and no corresponding federation was found in the L{Identity}
            object, </para></listitem> <listitem><para>
            #LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND if encryption is needed and
            the request issuing provider is unknown (it as not been registered
            in the L{Server} object), </para></listitem> <listitem><para>
            #LASSO_DS_ERROR_ENCRYPTION_FAILED if encryption is needed but it
            failed, </para></listitem> </itemizedlist>
        '''
        rc = _lasso.login_build_assertion(self._cptr, str2lasso(authenticationMethod), str2lasso(authenticationInstant), str2lasso(reauthenticateOnOrAfter), str2lasso(notBefore), str2lasso(notOnOrAfter))
        Error.raise_on_rc(rc)

    def buildAuthnRequestMsg(self):
        '''
        Converts profile authentication request (C{request} member) into a
        Liberty message, either an URL in HTTP-Redirect profile or an URL and
        a field value in Browser-POST (form) profile.
        
        The URL is set into the C{msg_url} member and the eventual field value
        (LAREQ) is set into the C{msg_body} member.
        
        @return: 0 on success; or <itemizedlist> <listitem><para>
            #LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if login is not a L{Login}
            object, </para></listitem> <listitem><para>
            #LASSO_PROFILE_ERROR_MISSING_REMOTE_PROVIDERID if not remote
            provider ID was setup&160;- it usually means that
            lasso_login_init_request() was not called before,
            </para></listitem> <listitem><para>
            #LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND if the remote provider ID
            is not registered in the server object, </para></listitem>
            <listitem><para> #LASSO_PROFILE_ERROR_UNSUPPORTED_PROFILE if the
            SSO profile is not supported by the targeted provider,
            </para></listitem> <listitem><para>
            #LASSO_PROFILE_ERROR_BUILDING_QUERY_FAILED if the building of the
            query part of the redirect URL or of the body of the POST content
            failed&160;- it only happens with the #LASSO_HTTP_METHOD_REDIRECT,
            #LASSO_HTTP_METHOD_POST, #LASSO_HTTP_METHOD_ARTIFACT_GET and
            #LASSO_HTTP_METHOD_ARTIFACT_POST bindings&160;-,
            </para></listitem> <listitem><para>
            #LASSO_PROFILE_ERROR_UNKNOWN_PROFILE_URL if the metadata of the
            remote provider does not contain an url for the SSO profile,
            </para></listitem> <listitem><para>
            #LASSO_PROFILE_ERROR_INVALID_REQUEST if the request object is not
            of the needed type, is usually means that
            lasso_login_init_request() was not called before,
            </para></listitem> <listitem><para> #LASSO_PROFILE_MISSING_REQUEST
            if the request object is missing, </para></listitem>
            <listitem><para> #LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD if the
            current setted C{http_method} on the L{Login} object is invalid.
            </para></listitem> </itemizedlist>
        '''
        rc = _lasso.login_build_authn_request_msg(self._cptr)
        Error.raise_on_rc(rc)

    def buildAuthnResponseMsg(self):
        '''
        Converts profile authentication response (C{response} member) into a
        Liberty message.
        
        The URL is set into the C{msg_url} member and the field value (LARES)
        is set into the C{msg_body} member.
        
        @return: 0 on success; or <itemizedlist> <listitem><para>
            LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if login is not a L{Login}
            object, </para></listitem> <listitem><para>
            LASSO_PROFILE_ERROR_INVALID_PROTOCOLPROFILE if the current
            protocol profile is not </para></listitem> <listitem><para>
            LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_POST or
            LASSO_LOGIN_PROTOCOL_PROFILE_BRWS_LECP, </para></listitem>
            <listitem><para> LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND if the
            remote provider ID is not registered in the server object,
            </para></listitem> <listitem><para>
            LASSO_PROFILE_ERROR_UNKNOWN_PROFILE_URL if the metadata of the
            remote provider does not contain an URL for the assertion
            consuming service, </para></listitem> <listitem><para>
            LASSO_PROFILE_ERROR_MISSING_SERVER the server object is needed to
            sign a message and it is missing, </para></listitem>
            <listitem><para> LASSO_DS_ERROR_PRIVATE_KEY_LOAD_FAILED the
            private key for signing could not be found, </para></listitem>
            <listitem><para> LASSO_PROFILE_ERROR_MISSING_RESPONSE if the
            response object is missing, </para></listitem> <listitem><para>
            LASSO_PROFILE_ERROR_UNSUPPORTED_PROFILE if the SSO profile is not
            supported by the targeted provider, </para></listitem>
            <listitem><para> LASSO_PROFILE_BUILDING_QUERY_FAILED if using
            #LASSO_HTTP_METHOD_REDIRECT building of the redirect URL failed,
            </para></listitem> <listitem><para>
            LASSO_PROFILE_BUILDING_MSG_FAILED if using
            #LASSO_HTTP_METHOD_POST, #LASSO_HTTP_METHOD_SOAP or
            #LASSO_HTTP_METHOD_PAOS and building the C{msg_body} failed.
            </para></listitem> </itemizedlist>
        '''
        rc = _lasso.login_build_authn_response_msg(self._cptr)
        Error.raise_on_rc(rc)

    def buildRequestMsg(self):
        '''
        Produce a SOAP Artifact Resolve message. It must follows a call to
        lasso_login_init_request() on the artifact message. Converts  artifact
        request into a Liberty SOAP message.
        
        The URL is set into the C{msg_url} member and the SOAP message is set
        into the C{msg_body} member. You should POST the C{msg_body} to the
        C{msg_url} afterward.
        
        @return: 0 on success; or LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if
            login is not a L{Login} object,
            LASSO_PROFILE_ERROR_MISSING_REMOTE_PROVIDERID if not remote
            provider ID was setup -- it usually means that
            lasso_login_init_request was not called before,
            LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND if the remote provider ID is
            not registered in the server object.
        '''
        rc = _lasso.login_build_request_msg(self._cptr)
        Error.raise_on_rc(rc)

    def buildResponseMsg(self, remote_providerID = None):
        '''
        Converts profile assertion response (C{response} member) into a
        Liberty SOAP messageresponse message.
        
        The URL is set into the C{msg_url} member and the SOAP message is set
        into the C{msg_body} member.
        
        @param remote_providerID:  service provider ID
        @return: 0 on success; or a negative value otherwise.
            LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if login is not a L{Login}
            object, LASSO_PROFILE_ERROR_SESSION_NOT_FOUND if no session object
            was found in the login profile object -- it should be created by
            lasso_login_build_assertion() if you did not set it manually
            before calling lasso_login_build_assertion().
        '''
        rc = _lasso.login_build_response_msg(self._cptr, str2lasso(remote_providerID))
        Error.raise_on_rc(rc)

    def dump(self):
        '''
        Dumps C{self} content to an XML string.
        
        @return: the dump string.
        '''
        return _lasso.login_dump(self._cptr)

    def initAuthnRequest(self, remote_providerID = None, http_method = HTTP_METHOD_REDIRECT):
        '''
        <para>Initializes a new AuthnRequest from current service provider to
        remote identity provider specified in C{remote_providerID} (if None
        the first known identity provider is used).</para>
        
        <para>For ID-FF 1.2 the default NameIDPolicy in an AuthnRequest is
        None, which imply that a federation must already exist on the IdP
        side.</para>
        
        <para>For SAML 2.0 the default NameIDPolicy is the first listed in the
        metadatas of the current provider, or if none is specified, Transient,
        which ask the IdP to give a one-time federation</para>
        
        @param remote_providerID:  the providerID of the identity provider
            (may be None)
        @param http_method:  HTTP method to use for request transmission
        @return: 0 on success; or <itemizedlist>
            <listitem><para>LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if login is
            not a L{Login} object,</para></listitem>
            <listitem><para>LASSO_PROFILE_ERROR_MISSING_REMOTE_PROVIDERID if
            C{remote_providerID} is None and no default remote provider could
            be found from the server object -- usually the first one in the
            order of adding to the server object --,</para></listitem>
            <listitem><para>LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND if the
            C{remote_providerID} is not known to our server
            object.</para></listitem>
            <listitem><para>LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD if the
            HTTP method is neither LASSO_HTTP_METHOD_REDIRECT or
            LASSO_HTTP_METHOD_POST,</para></listitem>
            <listitem><para>LASSO_PROFILE_ERROR_BUILDING_REQUEST_FAILED if
            creation of the request object failed.</para></listitem>
            </itemizedlist>
        '''
        rc = _lasso.login_init_authn_request(self._cptr, str2lasso(remote_providerID), http_method)
        Error.raise_on_rc(rc)

    def initRequest(self, response_msg, response_http_method = HTTP_METHOD_REDIRECT):
        '''
        Initializes an artifact request. C{response_msg} is either the query
        string (in redirect mode) or the form LAREQ field (in browser-post
        mode). It should only be used if you received an artifact message,
        C{response_msg} must be content of the artifact field for the POST
        artifact binding of the query string for the REDIRECT artifact
        binding. You must set the C{response_http_method} argument according
        to the way you received the artifact message.
        
        @param response_msg:  the authentication response received
        @param response_http_method:  the method used to receive the
            authentication response
        @return: 0 on success; or <itemizedlist> <listitem> <para>
            LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if login is not a L{Login}
            object, </para> </listitem> <listitem> <para>
            LASSO_PARAM_ERROR_INVALID_VALUE if C{response_msg} is None,
            </para> </listitem> <listitem> <para>
            LASSO_PROFILE_ERROR_INVALID_HTTP_METHOD if the HTTP method is
            neither LASSO_HTTP_METHOD_REDIRECT or LASSO_HTTP_METHOD_POST (in
            the ID-FF 1.2 case) or neither LASSO_HTTP_METHOD_ARTIFACT_GET or
            LASSO_HTTP_METHOD_ARTIFACT_POST (in the SAML 2.0 case), </para>
            </listitem> <listitem> <para> LASSO_PROFILE_ERROR_MISSING_ARTIFACT
            if no artifact field was found in the query string (only possible
            for the LASSO_HTTP_METHOD_REDIRECT case), </para> </listitem>
            <listitem> <para> LASSO_PROFILE_ERROR_INVALID_ARTIFACT if decoding
            of the artifact failed -- whether because the base64 encoding is
            invalid or because the type code is wrong --, </para> </listitem>
            <listitem> <para> LASSO_PROFILE_ERROR_MISSING_REMOTE_PROVIDERID if
            no provider ID could be found corresponding to the hash contained
            in the artifact. </para> </listitem> </itemizedlist>
        '''
        rc = _lasso.login_init_request(self._cptr, str2lasso(response_msg), response_http_method)
        Error.raise_on_rc(rc)

    def initIdpInitiatedAuthnRequest(self, remote_providerID):
        '''
        <para>Generates an authentication response without matching
        authentication request.</para>
        
        <para>The choice of NameIDFormat is the same as for
        lasso_login_init_authn_request() but with the target
        C{remote_providerID} as the current provider</para>
        
        <para>If C{remote_providerID} is None, the first known provider is
        used.</para>
        
        @param remote_providerID:  the providerID of the remote service
            provider (may be None)
        @return: 0 on success; or a negative value otherwise. Error codes are
            the same as lasso_login_init_authn_request().
        '''
        rc = _lasso.login_init_idp_initiated_authn_request(self._cptr, str2lasso(remote_providerID))
        Error.raise_on_rc(rc)

    def mustAskForConsent(self):
        '''
        Evaluates if consent must be asked to the Principal to federate him.
        
        @return: True if consent must be asked
        '''
        return _lasso.login_must_ask_for_consent(self._cptr)

    def mustAuthenticate(self):
        '''
        Evaluates if user must be authenticated.
        
        @return: True if user must be authenticated
        '''
        return _lasso.login_must_authenticate(self._cptr)

    def processAuthnRequestMsg(self, authn_request_msg = None):
        '''
        Processes received authentication request, checks it is signed
        correctly, checks if requested protocol profile is supported, etc.
        
        @param authn_request_msg:  the authentication request received
        @return: 0 on success; or <itemizedlist> <listitem> <para>
            #LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if login is no a L{Login}
            object, </para> </listitem> <listitem> <para>
            #LASSO_PROFILE_ERROR_MISSING_REQUEST if C{authn_request_msg} is
            #None and no request as actually been processed or initialized
            &#151; see lasso_login_init_idp_initiated_authn_request(),
        '''
        rc = _lasso.login_process_authn_request_msg(self._cptr, str2lasso(authn_request_msg))
        Error.raise_on_rc(rc)

    def processAuthnResponseMsg(self, authn_response_msg):
        '''
        Processes received authentication response.
        
        @param authn_response_msg:  the authentication response received
        @return: 0 on success; or <itemizedlist>
            <listitem><para>#LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if login
            is not a L{Login} object,</para></listitem>
            <listitem><para>#LASSO_PARAM_ERROR_INVALID_VALUE if
            authn_response_msg is None,</para></listitem>
            <listitem><para>#LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND, if the
            issuing provider of the assertion is not registered in the
            L{Server} object,</para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_MISSING_ISSUER if the parsed
            samlp2:AuthnRequest does not have a proper Issuer element,
            </para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_MISSING_STATUS_CODE if the
            reponse is missing a <literal>StatusCode</literal>
            element,</para></listitem>
            <listitem><para>#LASSO_PROFILE_STATUS_NOT_SUCCESS_ERROR if the
            identity provider returned a failure response,</para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_REQUEST_DENIED</para> if the
            identity provider returned the specific status code
            <literal>RequestDenied</literal>,</listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_INVALID_MSG if the message is
            not a L{SamlpResponse} (ID-FF 1.2) or a L{Samlp2ResponseMsg} (SAML
            2.0),</para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_UNSUPPORTED_PROFILE, if the
            received message format does not correspond to a binding supported
            by this function, the only supported binding by this function is
            HTTP POST,</para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_MISSING_SERVER the server
            object is needed to sign a message and it is
            missing,</para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_CANNOT_VERIFY_SIGNATURE if
            the validation of the signature of the message failed, a specific
            error code is available in <literal>login->parent.signature_status
            </literal></para></listitem> <listitem><para>#LASSO_LOGIN_ERROR_AS
            SERTION_DOES_NOT_MATCH_REQUEST_ID if the received response does
            not match the saved AuthenticationRequest ID,</para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_INVALID_ISSUER if the
            assertion issuer does not match the AuthenticationResponse
            issuer,</para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND if
            not NameID could be found or decoded,</para></listitem>
            </itemizedlist>
        '''
        rc = _lasso.login_process_authn_response_msg(self._cptr, str2lasso(authn_response_msg))
        Error.raise_on_rc(rc)

    def processRequestMsg(self, request_msg):
        '''
        Processes received artifact request.
        
        @param request_msg:  the artifact request received
        '''
        rc = _lasso.login_process_request_msg(self._cptr, str2lasso(request_msg))
        Error.raise_on_rc(rc)

    def processResponseMsg(self, response_msg):
        '''
        Processes received assertion response.
        
        @param response_msg:  the assertion response received
        @return: 0 on success; or <itemizedlist>
            <listitem><para>#LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if login
            is not a L{Login} object,</para></listitem>
            <listitem><para>#LASSO_PARAM_ERROR_INVALID_VALUE if response_msg
            is None,</para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_INVALID_MSG if the message is
            not a L{SamlpResponse} (ID-FF 1.2) or a L{Samlp2ResponseMsg} (SAML
            2.0),</para></listitem> <listitem><para>#LASSO_PROFILE_ERROR_RESPO
            NSE_DOES_NOT_MATCH_REQUEST if the response does not refer to the
            request or if the response refer to an unknown request and <link
            linkend="strict-checking"><literal>strict-
            checking</literal></link> is activated ,</para></listitem>
            <listitem><para>#LASSO_LOGIN_ERROR_REQUEST_DENIED the identity
            provided returned a failure status of
            "RequestDenied"</para></listitem>
            <listitem><para>#LASSO_LOGIN_ERROR_FEDERATION_NOT_FOUND if
            creation of a new federation was not allowed and none
            existed,</para></listitem>
            <listitem><para>#LASSO_LOGIN_ERROR_UNKNOWN_PRINCIPAL if
            authentication failed or/and if the user cancelled the
            authentication,</para></listitem>
            <listitem><para>#LASSO_LOGIN_ERROR_STATUS_NOT_SUCCESS, if the
            response status is a failure but we have no more precise error
            code to report it, you must look at the second level status in the
            response,</para></listitem>
            <listitem><para>#LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND, if the
            issuing provider of the assertion is unknown,</para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_INVALID_ISSUER the issuer of
            the assertion received, is not the expected one</para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_NAME_IDENTIFIER_NOT_FOUND no
            statement was fournd, or none statement contains a subject with a
            name identifier,</para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_MISSING_STATUS_CODE if the
            reponse is missing a <literal>StatusCode</literal>
            element,</para></listitem>
            <listitem><para>#LASSO_PROFILE_ERROR_MISSING_ASSERTION if the
            message does not contain any assertion.</para></listitem>
            </itemizedlist>
        '''
        rc = _lasso.login_process_response_msg(self._cptr, str2lasso(response_msg))
        Error.raise_on_rc(rc)

    def validateRequestMsg(self, authentication_result, is_consent_obtained):
        '''
        Initializes a response to the authentication request received.
        
        @param authentication_result:  whether user has authenticated
            succesfully
        @param is_consent_obtained:  whether user consent has been obtained
        @return: 0 on success; or <itemizedlist>
            <listitem><para>#LASSO_PARAM_ERROR_BAD_TYPE_OR_None_OBJ if login
            is not a L{Login} object,</para></listitem>
            <listitem><para>#LASSO_LOGIN_ERROR_REQUEST_DENIED</para> if
            C{authentication_result} if FALSE,</listitem>
            <listitem><para>#LASSO_LOGIN_ERROR_INVALID_SIGNATURE if signature
            validation of the request failed,</para></listitem>
            <listitem><para>#LASSO_LOGIN_ERROR_UNSIGNED_AUTHN_REQUEST if no
            signature was present on the request,</para></listitem>
            <listitem><para>#LASSO_LOGIN_ERROR_FEDERATION_NOT_FOUND if
            federation policy is #LASSO_LIB_NAMEID_POLICY_TYPE_NONE and no
            federation was found in the L{Identity} object (ID-FF 1.2
            case)</para></listitem>
            <listitem><para>#LASSO_LOGIN_ERROR_INVALID_NAMEIDPOLICY if request
            policy is not one of #LASSO_LIB_NAMEID_POLICY_TYPE_FEDERATED or
            #LASSO_LIB_NAMEID_POLICY_TYPE_ANY (ID-FF 1.2 case) or if no NameID
            policy was defined or the AllowCreate request flag is FALSE (SAML
            2.0 case),</para></listitem>
            <listitem><para>#LASSO_LOGIN_ERROR_CONSENT_NOT_OBTAINED if
            C{is_consent_obtained} is FALSE and conssent was necessary (for
            example if the request does not communicate that consent was
            already obtained from the user),</para></listitem>
            <listitem><para>#LASSO_SERVER_ERROR_PROVIDER_NOT_FOUND if the
            requesting provider is unknown,</para></listitem> </itemizedlist>
        '''
        rc = _lasso.login_validate_request_msg(self._cptr, authentication_result, is_consent_obtained)
        Error.raise_on_rc(rc)

    def processPaosResponseMsg(self, msg):
        rc = _lasso.login_process_paos_response_msg(self._cptr, str2lasso(msg))
        Error.raise_on_rc(rc)

    def getAssertion(self):
        '''
        Return the last build assertion.
        
        @return: a L{Node} representing the build assertion (generally a
            L{SamlAssertion} when using ID-FF 1.2 or a L{Saml2Assertion} when
            using SAML 2.0)
        '''
        return cptrToPy(_lasso.login_get_assertion(self._cptr))

    assertion = property(getAssertion)

class Lecp(Login):
    def __init__(self, server):
        self._cptr = _lasso.lecp_new(server and server._cptr)
        if self._cptr is None:
            raise Error('failed to create object')

    def get_authnRequestEnvelope(self):
        t = _lasso.Lecp_authnRequestEnvelope_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_authnRequestEnvelope(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Lecp_authnRequestEnvelope_set(self._cptr, value)
    authnRequestEnvelope = property(get_authnRequestEnvelope, set_authnRequestEnvelope)

    def get_authnResponseEnvelope(self):
        t = _lasso.Lecp_authnResponseEnvelope_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_authnResponseEnvelope(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Lecp_authnResponseEnvelope_set(self._cptr, value)
    authnResponseEnvelope = property(get_authnResponseEnvelope, set_authnResponseEnvelope)

    def get_assertionConsumerServiceURL(self):
        t = _lasso.Lecp_assertionConsumerServiceURL_get(self._cptr)
        return t;
    def set_assertionConsumerServiceURL(self, value):
        value = str2lasso(value)
        _lasso.Lecp_assertionConsumerServiceURL_set(self._cptr, value)
    assertionConsumerServiceURL = property(get_assertionConsumerServiceURL, set_assertionConsumerServiceURL)

    def buildAuthnRequestEnvelopeMsg(self):
        '''
        Builds an enveloped authentication request message.  Sets C{msg_body}
        to that message.
        '''
        rc = _lasso.lecp_build_authn_request_envelope_msg(self._cptr)
        Error.raise_on_rc(rc)

    def buildAuthnRequestMsg(self):
        '''
        Builds an authentication request. The data for the sending of the
        request are stored in C{msg_url} and C{msg_body} (SOAP POST).
        '''
        rc = _lasso.lecp_build_authn_request_msg(self._cptr)
        Error.raise_on_rc(rc)

    def buildAuthnResponseMsg(self):
        '''
        Builds the lecp authentication response message (base64).  Sets
        C{msg_body} to that message.
        '''
        rc = _lasso.lecp_build_authn_response_msg(self._cptr)
        Error.raise_on_rc(rc)

    def buildAuthnResponseEnvelopeMsg(self):
        '''
        Builds the enveloped LECP authentication response message (SOAP
        message). Sets C{msg_body} to that message.
        '''
        rc = _lasso.lecp_build_authn_response_envelope_msg(self._cptr)
        Error.raise_on_rc(rc)

    def initAuthnRequest(self, remote_providerID = None):
        '''
        Initializes a new lib:AuthnRequest.
        
        @param remote_providerID:  the providerID of the identity provider.
            When None, the first known identity provider is used.
        '''
        rc = _lasso.lecp_init_authn_request(self._cptr, str2lasso(remote_providerID))
        Error.raise_on_rc(rc)

    def processAuthnRequestMsg(self, authn_request_msg):
        '''
        Processes received authentication request, checks it is signed
        correctly, checks if requested protocol profile is supported, etc.
        
        @param authn_request_msg:  the authentication request received
        '''
        rc = _lasso.lecp_process_authn_request_msg(self._cptr, str2lasso(authn_request_msg))
        Error.raise_on_rc(rc)

    def processAuthnRequestEnvelopeMsg(self, request_msg):
        '''
        Processes received enveloped authentication request, extracts the
        authentication request out of it.
        
        @param request_msg:  the enveloped authentication request received
        '''
        rc = _lasso.lecp_process_authn_request_envelope_msg(self._cptr, str2lasso(request_msg))
        Error.raise_on_rc(rc)

    def processAuthnResponseEnvelopeMsg(self, response_msg):
        '''
        Processes received enveloped authentication response, extracts the
        authentication response out of it and stores it in C{response}.
        
        @param response_msg:  the enveloped authentication response received
        '''
        rc = _lasso.lecp_process_authn_response_envelope_msg(self._cptr, str2lasso(response_msg))
        Error.raise_on_rc(rc)


class Session(Node):
    def __init__(self, ):
        self._cptr = _lasso.session_new()
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromDump(cls, dump):
         return cptrToPy(_lasso.session_new_from_dump(str2lasso(dump)))

    def get_assertions(self):
        t = _lasso.Session_assertions_get(self._cptr)
        if not t: return t
        d2 = {}
        for k, v in t.items():
            d2[k] = cptrToPy(v)
        t = frozendict(d2)
        return t;
    def set_assertions(self, value):
        _lasso.Session_assertions_set(self._cptr, value)
    assertions = property(get_assertions, set_assertions)

    def get_isDirty(self):
        t = _lasso.Session_isDirty_get(self._cptr)
        return t;
    def set_isDirty(self, value):
        _lasso.Session_isDirty_set(self._cptr, value)
    isDirty = property(get_isDirty, set_isDirty)

    def dump(self):
        '''
        Dumps C{self} content to an XML string.
        
        @return: the dump string.
        '''
        return _lasso.session_dump(self._cptr)

    def getAssertions(self, provider_id = None):
        '''
        Gets the assertions for the given C{provider_id}.
        
        @param provider_id:  the provider ID
        @return: a list of L{SamlAssertion}.
        '''
        value = _lasso.session_get_assertions(self._cptr, str2lasso(provider_id))
        if value is not None:
            value = tuple([cptrToPy(x) for x in value])
        return value

    def getProviderIndex(self, index):
        '''
        Looks up and returns the nth provider id.
        
        @param index:  index of requested provider
        @return: the provider id; or None if there were no nth provider.
        '''
        return _lasso.session_get_provider_index(self._cptr, index)

    def isEmpty(self):
        '''
        Returns True if session is empty.
        
        @return: True if empty
        '''
        return _lasso.session_is_empty(self._cptr)

    def removeAssertion(self, providerID):
        '''
        Removes assertion for C{providerID} from C{self}.
        
        @param providerID:  the provider ID
        '''
        rc = _lasso.session_remove_assertion(self._cptr, str2lasso(providerID))
        Error.raise_on_rc(rc)

    def getAssertion(self, providerID):
        '''
        Gets the assertion for the given C{providerID}.
        
        @param providerID:  the provider ID
        @return: the assertion or None if it didn't exist.  This
            L{SamlAssertion} is internally allocated and must not be freed by
            the caller.
        '''
        return cptrToPy(_lasso.session_get_assertion(self._cptr, str2lasso(providerID)))

    def addAssertion(self, providerID, assertion):
        '''
        Adds C{assertion} to the principal session. This function also add the
        assertion to the index by assertionID.
        
        @param providerID:  the provider ID
        @param assertion:  the assertion
        '''
        rc = _lasso.session_add_assertion(self._cptr, str2lasso(providerID), assertion and assertion._cptr)
        Error.raise_on_rc(rc)

    def getNameIds(self, providerID):
        '''
        List the known NameID coming from this provider during this session.
        
        @param providerID:  a provider identifier
        @return: a list of L{Node} objects.
        '''
        value = _lasso.session_get_name_ids(self._cptr, str2lasso(providerID))
        if value is not None:
            value = tuple([cptrToPy(x) for x in value])
        return value

    def getSessionIndexes(self, providerID, name_id):
        '''
        Gets all the registered session indexes for this session.
        
        @param providerID:  a provider id
        @param name_id:  a L{SamlAssertion} or L{Saml2Assertion} object
        @return: a list of string containing the session index identifiers.
        '''
        return _lasso.session_get_session_indexes(self._cptr, str2lasso(providerID), name_id and name_id._cptr)

    def getAssertionIds(self, providerID):
        '''
        List the ids of assertions received during the current session.
        
        @param providerID:  a provider identifier
        @return: a list of strings
        '''
        return _lasso.session_get_assertion_ids(self._cptr, str2lasso(providerID))


class Federation(Node):
    def __init__(self, remote_providerID):
        self._cptr = _lasso.federation_new(str2lasso(remote_providerID))
        if self._cptr is None:
            raise Error('failed to create object')

    def get_remoteProviderId(self):
        t = _lasso.Federation_remoteProviderId_get(self._cptr)
        return t;
    def set_remoteProviderId(self, value):
        value = str2lasso(value)
        _lasso.Federation_remoteProviderId_set(self._cptr, value)
    remoteProviderId = property(get_remoteProviderId, set_remoteProviderId)

    def get_localNameIdentifier(self):
        t = _lasso.Federation_localNameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_localNameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Federation_localNameIdentifier_set(self._cptr, value)
    localNameIdentifier = property(get_localNameIdentifier, set_localNameIdentifier)

    def get_remoteNameIdentifier(self):
        t = _lasso.Federation_remoteNameIdentifier_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_remoteNameIdentifier(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Federation_remoteNameIdentifier_set(self._cptr, value)
    remoteNameIdentifier = property(get_remoteNameIdentifier, set_remoteNameIdentifier)

    def buildLocalNameIdentifier(self, nameQualifier, format, content):
        '''
        Builds federation local name identifier.
        
        @param nameQualifier:  the name identifier qualifier
        @param format:  the name identifier format
        @param content:  the name identifier content
        '''
        _lasso.federation_build_local_name_identifier(self._cptr, str2lasso(nameQualifier), str2lasso(format), str2lasso(content))

    def verifyNameIdentifier(self, name_identifier):
        '''
        Checks whether federation is for C{name_identifier}.
        
        @param name_identifier:  the L{SamlNameIdentifier}
        @return: True if the federation is for C{name_identifier}.
        '''
        return _lasso.federation_verify_name_identifier(self._cptr, name_identifier and name_identifier._cptr)


class NameIdentifierMapping(Profile):
    def __init__(self, server):
        self._cptr = _lasso.name_identifier_mapping_new(server and server._cptr)
        if self._cptr is None:
            raise Error('failed to create object')

    def get_targetNameIdentifier(self):
        t = _lasso.NameIdentifierMapping_targetNameIdentifier_get(self._cptr)
        return t;
    def set_targetNameIdentifier(self, value):
        value = str2lasso(value)
        _lasso.NameIdentifierMapping_targetNameIdentifier_set(self._cptr, value)
    targetNameIdentifier = property(get_targetNameIdentifier, set_targetNameIdentifier)

    def buildRequestMsg(self):
        '''
        Builds a name identifier mapping request message.
        
        
        
         - If it is a SOAP method, then it builds the request as a SOAP
           message,   optionally signs his node, sets C{msg_body} with that
           message and sets   C{msg_url} with the SOAP Endpoint URL
        
         - If it is a HTTP-Redirect method, then it builds the request as a
           query   string message, optionally signs it and sets C{msg_url} to
           that URL.
        '''
        rc = _lasso.name_identifier_mapping_build_request_msg(self._cptr)
        Error.raise_on_rc(rc)

    def buildResponseMsg(self):
        '''
        Builds a name identifier mapping response message.
        
        
        
         - If it is a SOAP method, then it builds the response as a SOAP
           message,   optionally signs his node, sets C{msg_body} with that
           message and sets   C{msg_url} with the register name identifier
           service return URL.
        
         - If it is a HTTP-Redirect method, then it builds the response as a
           query   string message, optionally signs it and sets C{msg_url} to
           that URL.
        
        If private key and certificate are set in server object it will also
        signs the message (either with X509 if SOAP or with a simple signature
        for query strings).
        '''
        rc = _lasso.name_identifier_mapping_build_response_msg(self._cptr)
        Error.raise_on_rc(rc)

    def initRequest(self, targetNamespace, remote_providerID = None):
        '''
        Initializes a new lib:NameIdentifierMappingRequest request.
        
        @param targetNamespace:  the request targetNamespace
        @param remote_providerID:  the providerID of the identity provider.
        '''
        rc = _lasso.name_identifier_mapping_init_request(self._cptr, str2lasso(targetNamespace), str2lasso(remote_providerID))
        Error.raise_on_rc(rc)

    def processRequestMsg(self, request_msg):
        '''
        Processes a lib:NameIdentifierMappingRequest message.  Rebuilds a
        request object from the message and optionally verifies its signature.
        
        @param request_msg:  the name identifier mapping request message
        '''
        rc = _lasso.name_identifier_mapping_process_request_msg(self._cptr, str2lasso(request_msg))
        Error.raise_on_rc(rc)

    def processResponseMsg(self, response_msg):
        '''
        Processes a lib:NameIdentifierMappingResponse message.  Rebuilds a
        response object from the message and optionally verifies its
        signature.
        
        If the response depicts Success it will also sets
        C{targetNameIdentifier}.
        
        @param response_msg:  the name identifier mapping response message
        '''
        rc = _lasso.name_identifier_mapping_process_response_msg(self._cptr, str2lasso(response_msg))
        Error.raise_on_rc(rc)

    def validateRequest(self):
        '''
        Checks profile request with regards to message status and principal
        federations, update them accordingly and prepares a
        lib:NameIdentifierMappingResponse accordingly.
        '''
        rc = _lasso.name_identifier_mapping_validate_request(self._cptr)
        Error.raise_on_rc(rc)


class AssertionQuery(Profile):
    def __init__(self, server):
        self._cptr = _lasso.assertion_query_new(server and server._cptr)
        if self._cptr is None:
            raise Error('failed to create object')

    def initRequest(self, remote_provider_id, http_method, query_request_type):
        '''
        Initializes a new Assertion Query Request. For the AssertionID request
        type, the remote_provider_id is mandatory, for all other kind of
        request it is optional if we can find a provider supporting the
        associated role, i.e. IDP; authentication, attribute and authorization
        authority.
        
        @param remote_provider_id:  the providerID of the remote provider.
        @param http_method:  if set, then it get the protocol profile in
            metadata corresponding of this HTTP request method.
        @param query_request_type:  the type of request.
        '''
        rc = _lasso.assertion_query_init_request(self._cptr, str2lasso(remote_provider_id), http_method, query_request_type)
        Error.raise_on_rc(rc)

    def validateRequest(self):
        '''
        Processes a Assertion query or request; caller must add assertions to
        the response afterwards.
        '''
        rc = _lasso.assertion_query_validate_request(self._cptr)
        Error.raise_on_rc(rc)

    def buildRequestMsg(self):
        '''
        Build an Assertion Query profile request message.
        '''
        rc = _lasso.assertion_query_build_request_msg(self._cptr)
        Error.raise_on_rc(rc)

    def processRequestMsg(self, request_msg):
        '''
        Processes a Assertion query or request message.  Rebuilds a request
        object from the message and check its signature.
        
        @param request_msg:  the Assertion query or request message
        '''
        rc = _lasso.assertion_query_process_request_msg(self._cptr, str2lasso(request_msg))
        Error.raise_on_rc(rc)

    def buildResponseMsg(self):
        '''
        Builds the Response message.
        '''
        rc = _lasso.assertion_query_build_response_msg(self._cptr)
        Error.raise_on_rc(rc)

    def processResponseMsg(self, response_msg):
        '''
        Parses the response message and builds the corresponding response
        object.
        
        @param response_msg:  the response message
        '''
        rc = _lasso.assertion_query_process_response_msg(self._cptr, str2lasso(response_msg))
        Error.raise_on_rc(rc)

    def addAttributeRequest(self, format, name):
        '''
        Append a new attribute designator to the current attribute request.
        
        @param attribute_format:  the attribute designator format
        @param attribute_name:  the attribute designator name
        @return: 0 if successful, an error code otherwise.
        '''
        rc = _lasso.assertion_query_add_attribute_request(self._cptr, str2lasso(format), str2lasso(name))
        Error.raise_on_rc(rc)

    def getRequestType(self):
        '''
        Return the type of the last processed request.
        
        @return: a L{AssertionQueryRequestType} value
        '''
        return _lasso.assertion_query_get_request_type(self._cptr)

    requestType = property(getRequestType)

class Ecp(Profile):
    def __init__(self, server):
        self._cptr = _lasso.ecp_new(server and server._cptr)
        if self._cptr is None:
            raise Error('failed to create object')

    def get_assertionConsumerUrl(self):
        t = _lasso.Ecp_assertionConsumerUrl_get(self._cptr)
        return t;
    def set_assertionConsumerUrl(self, value):
        value = str2lasso(value)
        _lasso.Ecp_assertionConsumerUrl_set(self._cptr, value)
    assertionConsumerUrl = property(get_assertionConsumerUrl, set_assertionConsumerUrl)

    def get_messageId(self):
        t = _lasso.Ecp_messageId_get(self._cptr)
        return t;
    def set_messageId(self, value):
        value = str2lasso(value)
        _lasso.Ecp_messageId_set(self._cptr, value)
    messageId = property(get_messageId, set_messageId)

    def get_responseConsumerUrl(self):
        t = _lasso.Ecp_responseConsumerUrl_get(self._cptr)
        return t;
    def set_responseConsumerUrl(self, value):
        value = str2lasso(value)
        _lasso.Ecp_responseConsumerUrl_set(self._cptr, value)
    responseConsumerUrl = property(get_responseConsumerUrl, set_responseConsumerUrl)

    def get_relaystate(self):
        t = _lasso.Ecp_relaystate_get(self._cptr)
        return t;
    def set_relaystate(self, value):
        value = str2lasso(value)
        _lasso.Ecp_relaystate_set(self._cptr, value)
    relaystate = property(get_relaystate, set_relaystate)

    def get_issuer(self):
        t = _lasso.Ecp_issuer_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_issuer(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Ecp_issuer_set(self._cptr, value)
    issuer = property(get_issuer, set_issuer)

    def get_providerName(self):
        t = _lasso.Ecp_providerName_get(self._cptr)
        return t;
    def set_providerName(self, value):
        value = str2lasso(value)
        _lasso.Ecp_providerName_set(self._cptr, value)
    providerName = property(get_providerName, set_providerName)

    def get_isPassive(self):
        t = _lasso.Ecp_isPassive_get(self._cptr)
        return t;
    def set_isPassive(self, value):
        _lasso.Ecp_isPassive_set(self._cptr, value)
    isPassive = property(get_isPassive, set_isPassive)

    def get_spIdpList(self):
        t = _lasso.Ecp_spIdpList_get(self._cptr)
        t = cptrToPy(t)
        return t;
    def set_spIdpList(self, value):
        if value is not None:
            value = value and value._cptr
        _lasso.Ecp_spIdpList_set(self._cptr, value)
    spIdpList = property(get_spIdpList, set_spIdpList)

    def get_knownSpProvidedIdpEntriesSupportingEcp(self):
        t = _lasso.Ecp_knownSpProvidedIdpEntriesSupportingEcp_get(self._cptr)
        if not t: return t
        t = tuple([cptrToPy(x) for x in t])
        return t;
    def set_knownSpProvidedIdpEntriesSupportingEcp(self, value):
        if value is not None:
            value = tuple([x._cptr for x in value])
        _lasso.Ecp_knownSpProvidedIdpEntriesSupportingEcp_set(self._cptr, value)
    knownSpProvidedIdpEntriesSupportingEcp = property(get_knownSpProvidedIdpEntriesSupportingEcp, set_knownSpProvidedIdpEntriesSupportingEcp)

    def get_knownIdpEntityIdsSupportingEcp(self):
        t = _lasso.Ecp_knownIdpEntityIdsSupportingEcp_get(self._cptr)
        return t;
    def set_knownIdpEntityIdsSupportingEcp(self, value):
        _lasso.Ecp_knownIdpEntityIdsSupportingEcp_set(self._cptr, value)
    knownIdpEntityIdsSupportingEcp = property(get_knownIdpEntityIdsSupportingEcp, set_knownIdpEntityIdsSupportingEcp)

    def processAuthnRequestMsg(self, authn_request_msg):
        '''
        This function implements the following ECP step: ECP Step 3, ECP
        determines IdP ECP Step 4, parse SP PAOS Authn request, build SOAP for
        IdP
        
        This is to be used in an ECP client. The C{authn_request_msg} is the
        SOAP PAOS message received from the SP in response to a resource
        request with an HTTP Accept header indicating PAOS support.
        
        The following actions are implemented:
        
        * Extract the samlp:AuthnRequest from the SOAP body and build a   new
        SOAP message containing the samlp:AuthnRequest which will   be
        forwarded to the IdP. This new SOAP message is stored in the
        L{Profile}.msg_body.
        
        * Parse the SOAP header which will contain a paos:Request, a
        ecp:Request and optionally a ecp:RelayState. Some of the data   in
        these headers need to be preserved for later processing steps.
        
          1. The paos:Request.responseConsumerURL is copied to the
        L{Ecp}.response_consumer_url. This is necessary because the      ECP
        client MUST assure it matches the
        ecp:Response.AssertionConsumerServiceURL returned by the IdP to
        prevent man-in-the-middle attacks. It must also match the
        samlp:AuthnRequest.AssertionConsumerServiceURL.
        
          2. If the paos:Request contained a messageID it is copied to
        L{Ecp}.message_id so it can be returned in the subsequent
        paos:Response.refToMessageID. This allows a provider to      correlate
        messages.
        
          3. If an ecp:RelayState is present it is copied to
        L{Ecp}.relaystate. This is necessary because in step 7 when      the
        ECP responds to the SP it must include RelayState provided in      the
        request.
        
        * In addition the following items are copied to the L{Ecp} for
        informational purposes:
        
          * L{Ecp}.issuer = ecp:Request.Issuer
        
          * L{Ecp}.provider_name = ecp:Request.ProviderName
        
          * L{Ecp}.is_passive = ecp:Request.IsPassive
        
          * L{Ecp}.sp_idp_list = ecp:Request.IDPList
        
        # IdP Selection
        
        In Step 3. The ECP must determine the IdP to forward the AuthnRequest
        to. There are two sets of IdP's which come into play. The ECP client
        has a set of IdP's it knows about because their metadata has been
        loaded into the L{Server} object. The SP may optionally send a list of
        IdP's in the ecp:Request that it trusts.
        
        The selected IdP *must* be one of the IdP's loaded into the L{Server}
        object from metadata because the IdP endpoints must be known.
        Furthermore the IdP *must* support the SingleSignOnService using the
        SOAP binding. Therefore the known IdP's are filtered for those that
        match this criteria and a list of their EntityID's are assigned to
        L{Ecp}.known_idp_entity_ids_supporting_ecp. The selected IdP *must* be
        a member of this list.
        
        The SP may optionally send a list of IdP's it trusts. If the SP sends
        an IDPList the selected IdP should be a member of this list and from
        above we know it must also be a member of the
        L{Ecp}.known_idp_entity_ids_supporting_ecp. Therefore the
        L{Ecp}.known_sp_provided_idp_entries_supporting_ecp list is set to the
        common members (e.g. intersection) of the SP provided IdP list and the
        list of known IdP's supporting ECP.
        
        When making an IdP selection if the SP provided an IdP List (use
        L{Ecp}.lasso_ecp_has_sp_idplist()) then it should be selected from the
        L{Ecp}.known_sp_provided_idp_entries_supporting_ecp list. Otherwise
        the IdP should be selected from
        L{Ecp}.known_idp_entity_ids_supporting_ecp.
        
        A default IdP will be selected using the above logic by picking the
        first IdP in the appropriate list, it's endpoint URL will be assigned
        to L{Profile}.msg_url. The above processing is implemented by
        L{Ecp}.lasso_ecp_process_sp_idp_list() and if the SP IDPList is
        updated this routine should be called.
        
        A note about the 3 IdP lists. The L{Ecp}.sp_idp_list.IDPList and
        L{Ecp}.known_sp_provided_idp_entries_supporting_ecp are #GList's of
        L{Samlp2IDPEntry} object which have a ProviderID, Name, and Loc
        attribute. You may wish to use this SP provided information when
        making a decision or presenting in a user interface that allows a user
        to make a choice. The L{Ecp}.known_idp_entity_ids_supporting_ecp is a
        #GList of EntityID strings.
        
        Given the EntityID of an IdP you can get the ECP endpoint by calling
        L{Ecp}.lasso_ecp_get_endpoint_url_by_entity_id()
        
        # Results
        
        After a successful return from this call you are ready to complete
        Step 4. and forward the request the IdP.
        
        The URL to send to the request to will be L{Profile}.msg_url (if you
        accept the default IdP) and the body of the message to post will be
        L{Profile}.msg_body.
        
         # Side Effects
        
        After a successful return the L{Ecp} object will be updated with:
        
        * ecp->response_consumer_url = paos_request->responseConsumerURL *
        ecp->message_id = paos_request->messageID * ecp->relaystate =
        ecp_relaystate->RelayState * ecp->issuer = ecp_request->Issue *
        ecp->provider_name = ecp_request->ProviderName * ecp->is_passive =
        ecp_request->IsPassive * ecp->known_idp_entity_ids_supporting_ecp *
        ecp->sp_idp_list = ecp_request->IDPList *
        ecp->known_sp_provided_idp_entries_supporting_ecp
        
        @param authn_request_msg:  the PAOS authn request received from the SP
        '''
        rc = _lasso.ecp_process_authn_request_msg(self._cptr, str2lasso(authn_request_msg))
        Error.raise_on_rc(rc)

    def processResponseMsg(self, response_msg):
        '''
        The function implements ECP Step 7; parse IdP SOAP response and build
        PAOS response for SP.
        
        See SAML Profile Section 4.2.4.5 PAOS Response Header Block: ECP to SP
        
        This is to be used in an ECP client. The C{response_msg} parameter
        contains the SOAP response from the IdP. We extract the ECP Header
        Block and body from it. We will generate a new PAOS message to send to
        the SP, the SOAP header will contain a paos:Response. If we received a
        paos:Request.MessageID in Step. 4 from the SP then we will copy it
        back to the paos:Response.refToMessageID. If we received a RelayState
        we will add that to the SOAP header as well.
        
        To prevent a man-in-the-middle attack we verify the
        responseConsumerURL we received in Step 4 matches the
        ecp:Response.AssertionConsumerServiceURL we just received back from
        the IdP. If they do not match we return a
        #LASSO_ECP_ERROR_ASSERTION_CONSUMER_URL_MISMATCH error and set the
        L{Provider}.msg_body to the appropriate SOAP fault.
        
        The new PAOS message for the SP we are buiding contains the IdP
        response in the new SOAP body and the new SOAP headers will contain a
        paso:Response and optionally an ecp:RelayState.
        
        After a successful return from this call you are ready to complete
        Step 7. and forward the response to the SP.
        
        The PASO message is assigned to the L{Provider}.msg_body and the
        desination URL is assigned to the L{Provider}.msg_url.
        
        # Side Effects
        
        After a successful return the L{Ecp} object will be updated with:
        
        * ecp->assertion_consumer_url =
        ecp_response->AssertionConsumerServiceURL * ecp.profile.msg_url =
        ecp->assertion_consumer_url * ecp.profile.msg_body_url = PAOS response
        to SP
        
        @param response_msg:  the SOAP response from the IdP
        '''
        rc = _lasso.ecp_process_response_msg(self._cptr, str2lasso(response_msg))
        Error.raise_on_rc(rc)

    def isProviderInSpIdplist(self, entity_id):
        '''
        Check to see if the provider with C{entity_id} is in the ecp IDPList
        returned by the SP.
        
        @param entity_id:  EntityID to check if member of L{Ecp}.IDPList
        @return: TRUE if C{entity_id} is in L{Ecp}.IDPList, FALSE otherwise
        '''
        return _lasso.ecp_is_provider_in_sp_idplist(self._cptr, str2lasso(entity_id))

    def isIdpEntryKnownIdpSupportingEcp(self, idp_entry):
        '''
        Check to see if the C{idp_entry} is in the C{entity_id_list}
        
        @param idp_entry:  L{Samlp2IDPEntry} to check if member of
            C{entity_id_list}
        @return: TRUE if C{entity_id} is in C{idp_list}, FALSE otherwise
        '''
        return _lasso.ecp_is_idp_entry_known_idp_supporting_ecp(self._cptr, idp_entry and idp_entry._cptr)

    def setKnownSpProvidedIdpEntriesSupportingEcp(self):
        '''
        The SP may provide a list of L{Samlp2IDPEntry} (L{Ecp}.sp_idp_list)
        which it trusts. The ECP client has a list of IDP EntityID's it knows
        supports ECP (L{Ecp}.known_idp_entity_ids_supporting_ecp).  The set of
        possible IDP's which can service the SP's authn request are the
        interesection of these two lists (the IDP's the SP approves and IDP's
        the ECP knows about). This find the common members between the two
        lists and assign them to
        L{Ecp}.known_sp_provided_idp_entries_supporting_ecp.
        '''
        _lasso.ecp_set_known_sp_provided_idp_entries_supporting_ecp(self._cptr)

    def hasSpIdplist(self):
        '''
        Returns TRUE if the SP provided an IDP List, FALSE otherwise.
        '''
        return _lasso.ecp_has_sp_idplist(self._cptr)

    def getEndpointUrlByEntityId(self, entity_id):
        '''
        Returns the SingleSignOnService SOAP endpoint URL for the specified
        C{entity_id}. If the provider cannot be found or if the provider does
        not have a matching endpoint None will be returned.
        
        Returns: url (must be freed by caller)
        
        @param entity_id:  the EntityID of the IdP
        '''
        return _lasso.ecp_get_endpoint_url_by_entity_id(self._cptr, str2lasso(entity_id))

    def processSpIdpList(self, sp_idp_list):
        '''
        The SP may optionally send a list of IdP's it trusts in ecp:IDPList.
        The ecp:IDPList may not be complete if the IDPList.GetComplete is non-
        None. If so the IDPList.GetComplete is a URL where a complete IDPList
        may be fetched.
        
        Whenever the IDPList is updated this function needs to be called
        because it sets the
        L{Ecp}.known_sp_provided_idp_entries_supporting_ecp and the default
        IdP URL (L{Profile}.msg_url).
        
        The L{Ecp} client has a list of IdP's it knows supports ECP
        (L{Ecp}.known_idp_entity_ids_supporting_ecp). The set of IdP's
        available to select from should be those in common between SP provided
        IdP list and those known by this ECP client to support ECP.
        
        This routine sets the
        L{Ecp}.known_sp_provided_idp_entries_supporting_ecp list to the common
        members (e.g. intersection) of the SP provided IdP list and the list
        of known IdP's supporting ECP.
        
        A default IdP will be selected and it's endpoint URL will be assigned
        to L{Profile}.msg_url.
        
        If the SP provided an IDP list then the default URL will be taken from
        first IDPEntry in L{Ecp}.known_sp_provided_idp_entries_supporting_ecp
        otherwise it will be taken from
        L{Ecp}.known_idp_entity_ids_supporting_ecp.
        '''
        return _lasso.ecp_process_sp_idp_list(self._cptr, sp_idp_list and sp_idp_list._cptr)


class NameIdManagement(Profile):
    def __init__(self, server):
        self._cptr = _lasso.name_id_management_new(server and server._cptr)
        if self._cptr is None:
            raise Error('failed to create object')

    @classmethod
    def newFromDump(cls, server, dump):
         return cptrToPy(_lasso.name_id_management_new_from_dump(server and server._cptr, str2lasso(dump)))

    def dump(self):
        '''
        Dumps C{self} content to an XML string.
        
        @return: the dump string.
        '''
        return _lasso.name_id_management_dump(self._cptr)

    def initRequest(self, remote_provider_id = None, new_name_id = None, http_method = HTTP_METHOD_ANY):
        '''
        Initializes a new Name Id Management Request. If C{new_name_id} is
        None, it is a Termination request, if not and we are an IdP is a
        NameID change request, if we are a SP, it is a request to add a SP
        provided Id to the NameID of the IdP. It can be useful if the SP do
        not want to store the federation, instead he can export its own
        identifiers to the IdP.
        
        @param remote_provider_id:  the providerID of the remote provider.
        @param new_name_id:  the new NameId or None to terminate a federation
        @param http_method:  if set, then it get the protocol profile in
            metadata corresponding of this HTTP request method.
        '''
        rc = _lasso.name_id_management_init_request(self._cptr, str2lasso(remote_provider_id), str2lasso(new_name_id), http_method)
        Error.raise_on_rc(rc)

    def buildRequestMsg(self):
        '''
        Builds the Name Id Management request message.
        '''
        rc = _lasso.name_id_management_build_request_msg(self._cptr)
        Error.raise_on_rc(rc)

    def processRequestMsg(self, request_msg):
        '''
        Processes a Name Id Management request message.  Rebuilds a request
        object from the message and check its signature.
        
        @param request_msg:  the Name Id Management request message
        '''
        rc = _lasso.name_id_management_process_request_msg(self._cptr, str2lasso(request_msg))
        Error.raise_on_rc(rc)

    def validateRequest(self):
        '''
        Processes a Name Id Management request, performing requested actions
        against principal federations.  Profile identity may have to be saved
        afterwards.
        '''
        rc = _lasso.name_id_management_validate_request(self._cptr)
        Error.raise_on_rc(rc)

    def buildResponseMsg(self):
        '''
        Builds the Name Id Management response message.
        '''
        rc = _lasso.name_id_management_build_response_msg(self._cptr)
        Error.raise_on_rc(rc)

    def processResponseMsg(self, response_msg):
        '''
        Parses the response message and builds the corresponding response
        object. Performs requested actions against principal federations.
        Profile identity may have to be saved afterwards.
        
        @param response_msg:  the response message
        '''
        rc = _lasso.name_id_management_process_response_msg(self._cptr, str2lasso(response_msg))
        Error.raise_on_rc(rc)


init = _lasso.init
shutdown = _lasso.shutdown
checkVersion = _lasso.check_version
setFlag = _lasso.set_flag
strError = _lasso.strError
registerDstService = _lasso.register_dst_service
getPrefixForDstServiceHref = _lasso.get_prefix_for_dst_service_href
registerIdwsf2DstService = _lasso.register_idwsf2_dst_service
getPrefixForIdwsf2DstServiceHref = _lasso.get_prefix_for_idwsf2_dst_service_href
buildUniqueId = _lasso.build_unique_id
getRequestTypeFromSoapMsg = _lasso.get_request_type_from_soap_msg
isLibertyQuery = _lasso.isLibertyQuery
profileGetIssuer = _lasso.profile_get_issuer
profileGetInResponseTo = _lasso.profile_get_in_response_to
isSamlQuery = _lasso.isSamlQuery
saml2NameIdBuildPersistent = _lasso.saml2_name_id_build_persistent
saml2EncryptedElementBuildEncryptedPersistentNameId = _lasso.saml2_encrypted_element_build_encrypted_persistent_name_id


import lasso

# backward compatibility with the SWIG binding

WSF_SUPPORT = WSF_ENABLED

Profile.isIdentityDirty = property(Profile.hasDirtyIdentity)
Profile.isSessionDirty = property(Profile.hasDirtySession)

def identity_get_provider_ids(self):
    return self.federations.keys()
Identity.providerIds = property(identity_get_provider_ids)

def server_get_provider_ids(self):
    return self.providers.keys()
Server.providerIds = property(server_get_provider_ids)

def session_get_provider_ids(self):
    return self.assertions.keys()
Session.providerIds = property(session_get_provider_ids)

def LassoNode__getstate__(self):
    return { '__dump__': self.dump() }

def LassoNode__setstate__(self, d):
    self._cptr = _lasso.node_new_from_dump(d.pop('__dump__'))

Node.__getstate__ = LassoNode__getstate__
Node.__setstate__ = LassoNode__setstate__

Samlp2AuthnRequest.nameIDPolicy = Samlp2AuthnRequest.nameIdPolicy
LibAuthnRequest.nameIDPolicy = LibAuthnRequest.nameIdPolicy
Saml2Subject.nameID = Saml2Subject.nameId
MiscTextNode.text_child = MiscTextNode.textChild
NodeList = list
StringList = list
StringDict = dict
registerIdWsf2DstService = registerIdwsf2DstService

if WSF_SUPPORT:
    DiscoDescription_newWithBriefSoapHttpDescription = DiscoDescription.newWithBriefSoapHttpDescription
    Discovery.buildRequestMsg = Discovery.buildSoapRequestMsg
    InteractionProfileService.buildRequestMsg = InteractionProfileService.buildSoapRequestMsg
    InteractionProfileService.buildResponseMsg = InteractionProfileService.buildSoapResponseMsg
    DataService.buildRequestMsg = DataService.buildSoapRequestMsg
    DiscoModifyResponse.newEntryIds = DiscoModifyResponse.newEntryIDs