This repository has been archived by the owner on Jun 20, 2019. It is now read-only.
forked from david-fry/gosaml
/
responseInterface.go
81 lines (68 loc) · 1.79 KB
/
responseInterface.go
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
package saml
import (
"encoding/xml"
)
type Response struct {
XMLName xml.Name
SAMLP string `xml:"saml2p,attr"`
Destination string `xml:"Destination,attr"`
ID string `xml:"ID,attr"`
Version string `xml:"Version,attr"`
IssueInstant string `xml:"IssueInstant,attr"`
Assertion Assertion `xml:"Assertion"`
Signature Signature `xml:"Signature"`
Issuer Issuer `xml:"Issuer"`
Status Status `xml:"Status"`
}
type Assertion struct {
XMLName xml.Name
ID string `xml:"ID,attr"`
Version string `xml:"Version,attr"`
SAML string `xml:"saml2,attr"`
IssueInstant string `xml:"IssueInstant,attr"`
Subject Subject
Conditions Conditions
AttributeStatement AttributeStatement
}
type Conditions struct {
XMLName xml.Name
NotBefore string `xml:",attr"`
NotOnOrAfter string `xml:",attr"`
}
type Subject struct {
XMLName xml.Name
SubjectConfirmation SubjectConfirmation
}
type SubjectConfirmation struct {
XMLName xml.Name
Method string `xml:",attr"`
SubjectConfirmationData SubjectConfirmationData
}
type Status struct {
XMLName xml.Name
StatusCode StatusCode `xml:"StatusCode"`
}
type SubjectConfirmationData struct {
Address string `xml:",attr"`
InResponseTo string `xml:",attr"`
NotOnOrAfter string `xml:",attr"`
Recipient string `xml:",attr"`
}
type StatusCode struct {
Value string `xml:"Value"`
}
/*
type AttributeValue struct {
XMLName xml.Name
Value string `xml:","`
}
*/
type Attribute struct {
Name string `xml:",attr"`
FriendlyName string `xml:",attr"`
//NameFormat string `xml:",attr"`
Value string `xml:"AttributeValue"`
}
type AttributeStatement struct {
Attributes []Attribute `xml:"Attribute"`
}