Documentation ¶
Index ¶
- Constants
- func Marshal(val interface{}) string
- func Unmarshal(data []byte, v interface{}) error
- type Assertion
- type Attribute
- type AttributeStatement
- type AttributeValue
- type AuthnStatement
- type BaseCondition
- type BinarySecurityToken
- type Condition
- type Conditions
- type Delegate
- type DelegateRestriction
- type InclusiveNamespaces
- type Issuer
- type KeyIdentifier
- type KeyInfo
- type Lifetime
- type Method
- type NameID
- type ProxyRestriction
- type Reference
- type RenewRestriction
- type RenewSecurityTokenBody
- type Renewing
- type RequestSecurityToken
- type RequestSecurityTokenBody
- type RequestSecurityTokenResponse
- type RequestSecurityTokenResponseCollection
- type RequestedSecurityToken
- type Security
- type SecurityReference
- type SecurityTokenReference
- type Signature
- type SignedInfo
- type Subject
- type SubjectConfirmation
- type SubjectConfirmationData
- type Target
- type Timestamp
- type Transform
- type Transforms
- type UseKey
- type UsernameToken
- type Value
- type X509Data
Constants ¶
View Source
const ( XSI = "http://www.w3.org/2001/XMLSchema-instance" WSU = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" DSIG = "http://www.w3.org/2000/09/xmldsig#" SHA256 = "http://www.w3.org/2001/04/xmldsig-more#rsa-sha256" Time = "2006-01-02T15:04:05.000Z" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Assertion ¶
type Assertion struct { XMLName xml.Name ID string `xml:",attr"` IssueInstant string `xml:",attr"` Version string `xml:",attr"` Issuer Issuer Signature Signature Subject Subject Conditions Conditions AuthnStatement AuthnStatement AttributeStatement AttributeStatement }
type Attribute ¶
type AttributeStatement ¶
func (*AttributeStatement) C14N ¶
func (a *AttributeStatement) C14N() string
type AttributeValue ¶
type AttributeValue struct { XMLName xml.Name Type string `xml:"type,attr"` Value string `xml:",innerxml"` }
func (*AttributeValue) C14N ¶
func (a *AttributeValue) C14N() string
type AuthnStatement ¶
type AuthnStatement struct { XMLName xml.Name AuthnInstant string `xml:",attr"` AuthnContext struct { XMLName xml.Name AuthnContextClassRef struct { XMLName xml.Name Value string `xml:",innerxml"` } } }
func (*AuthnStatement) C14N ¶
func (a *AuthnStatement) C14N() string
type BaseCondition ¶
type BaseCondition interface {
GetCondition() *Condition
}
type BinarySecurityToken ¶
type Condition ¶
type Condition struct {
Type string `xml:"xsi:type,attr,omitempty"`
}
func (*Condition) GetCondition ¶
type Conditions ¶
type Conditions struct { XMLName xml.Name NotBefore string `xml:",attr"` NotOnOrAfter string `xml:",attr"` ProxyRestriction *ProxyRestriction `xml:",omitempty"` Condition []BaseCondition `xml:",omitempty"` }
func (*Conditions) C14N ¶
func (c *Conditions) C14N() string
type DelegateRestriction ¶
type InclusiveNamespaces ¶
type KeyIdentifier ¶
type KeyInfo ¶
type KeyInfo struct { XMLName xml.Name NS string `xml:"xmlns:ds,attr,omitempty"` SecurityTokenReference *SecurityTokenReference `xml:",omitempty"` X509Data *X509Data `xml:",omitempty"` }
type Lifetime ¶
type ProxyRestriction ¶
type Reference ¶
type Reference struct { XMLName xml.Name URI string `xml:",attr"` Transforms Transforms DigestMethod Method DigestValue Value }
func NewReference ¶
type RenewRestriction ¶
type RenewSecurityTokenBody ¶
type RenewSecurityTokenBody struct { Req *RequestSecurityToken `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 RequestSecurityToken,omitempty"` Res *RequestSecurityTokenResponse `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 RequestSecurityTokenResponse,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` }
func (*RenewSecurityTokenBody) Fault ¶
func (b *RenewSecurityTokenBody) Fault() *soap.Fault
func (*RenewSecurityTokenBody) RequestSecurityToken ¶
func (b *RenewSecurityTokenBody) RequestSecurityToken() *RequestSecurityToken
type RequestSecurityToken ¶
type RequestSecurityToken struct { TokenType string `xml:",omitempty"` RequestType string `xml:",omitempty"` Lifetime *Lifetime `xml:",omitempty"` Renewing *Renewing `xml:",omitempty"` Delegatable bool `xml:",omitempty"` KeyType string `xml:",omitempty"` SignatureAlgorithm string `xml:",omitempty"` UseKey *UseKey `xml:",omitempty"` ActAs *Target `xml:",omitempty"` ValidateTarget *Target `xml:",omitempty"` RenewTarget *Target `xml:",omitempty"` }
func (*RequestSecurityToken) Action ¶
func (r *RequestSecurityToken) Action() string
func (*RequestSecurityToken) C14N ¶
func (r *RequestSecurityToken) C14N() string
func (*RequestSecurityToken) String ¶
func (r *RequestSecurityToken) String() string
type RequestSecurityTokenBody ¶
type RequestSecurityTokenBody struct { Req *RequestSecurityToken `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 RequestSecurityToken,omitempty"` Res *RequestSecurityTokenResponseCollection `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 RequestSecurityTokenResponseCollection,omitempty"` Fault_ *soap.Fault `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault,omitempty"` }
func (*RequestSecurityTokenBody) Fault ¶
func (b *RequestSecurityTokenBody) Fault() *soap.Fault
func (*RequestSecurityTokenBody) RequestSecurityToken ¶
func (b *RequestSecurityTokenBody) RequestSecurityToken() *RequestSecurityToken
type RequestSecurityTokenResponse ¶
type RequestSecurityTokenResponse struct { RequestedSecurityToken RequestedSecurityToken Lifetime *Lifetime `xml:"http://docs.oasis-open.org/ws-sx/ws-trust/200512 Lifetime"` }
func Renew ¶
func Renew(ctx context.Context, r soap.RoundTripper, req *RequestSecurityToken) (*RequestSecurityTokenResponse, error)
type RequestSecurityTokenResponseCollection ¶
type RequestSecurityTokenResponseCollection struct {
RequestSecurityTokenResponse RequestSecurityTokenResponse
}
func Issue ¶
func Issue(ctx context.Context, r soap.RoundTripper, req *RequestSecurityToken) (*RequestSecurityTokenResponseCollection, error)
type RequestedSecurityToken ¶
type RequestedSecurityToken struct {
Assertion string `xml:",innerxml"`
}
type Security ¶
type Security struct { XMLName xml.Name `xml:"wsse:Security"` WSSE string `xml:"xmlns:wsse,attr"` WSU string `xml:"xmlns:wsu,attr"` Timestamp Timestamp BinarySecurityToken *BinarySecurityToken `xml:",omitempty"` UsernameToken *UsernameToken `xml:",omitempty"` Assertion string `xml:",innerxml"` Signature *Signature `xml:",omitempty"` }
Security is used as soap.Envelope.Header.Security when signing requests.
type SecurityReference ¶
type SecurityTokenReference ¶
type SecurityTokenReference struct { XMLName xml.Name `xml:"wsse:SecurityTokenReference"` WSSE11 string `xml:"xmlns:wsse11,attr,omitempty"` TokenType string `xml:"wsse11:TokenType,attr,omitempty"` Reference *SecurityReference `xml:",omitempty"` KeyIdentifier *KeyIdentifier `xml:",omitempty"` }
type Signature ¶
type SignedInfo ¶
type SignedInfo struct { XMLName xml.Name NS string `xml:"xmlns:ds,attr,omitempty"` CanonicalizationMethod Method SignatureMethod Method Reference []Reference }
func (SignedInfo) C14N ¶
func (s SignedInfo) C14N() string
type Subject ¶
type Subject struct { XMLName xml.Name NameID NameID SubjectConfirmation SubjectConfirmation }
type SubjectConfirmation ¶
type SubjectConfirmation struct { XMLName xml.Name Method string `xml:",attr"` NameID *NameID SubjectConfirmationData SubjectConfirmationData }
type SubjectConfirmationData ¶
type Timestamp ¶
type Transform ¶
type Transform struct { XMLName xml.Name Algorithm string `xml:",attr"` InclusiveNamespaces *InclusiveNamespaces `xml:",omitempty"` }
type Transforms ¶
func (*Transforms) C14N ¶
func (t *Transforms) C14N() string
type UsernameToken ¶
Click to show internal directories.
Click to hide internal directories.