defs

package
v1.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action struct {
	Text           string `xml:",chardata"`
	MustUnderstand string `xml:"mustUnderstand,attr"`
}

type Address

type Address struct {
	Text     string `xml:",chardata"`
	Location string `xml:"location,attr"`
}

type AlgorithmSuite

type AlgorithmSuite struct {
	Text   string               `xml:",chardata"`
	Policy AlgorithmSuitePolicy `xml:"Policy"`
}

type AlgorithmSuitePolicy

type AlgorithmSuitePolicy struct {
	Text     string `xml:",chardata"`
	Basic256 Text   `xml:"Basic256"`
	Basic128 Text   `xml:"Basic128"`
}

type All

type All struct {
	Text                            string                          `xml:",chardata"`
	NegotiateAuthentication         NegotiateAuthentication         `xml:"NegotiateAuthentication"`
	TransportBinding                TransportBinding                `xml:"TransportBinding"`
	UsingAddressing                 Text                            `xml:"UsingAddressing"`
	EndorsingSupportingTokens       EndorsingSupportingTokens       `xml:"EndorsingSupportingTokens"`
	WSS11                           WSS11                           `xml:"Wss11"`
	Trust10                         Trust10                         `xml:"Trust10"`
	SignedSupportingTokens          SignedSupportingTokens          `xml:"SignedSupportingTokens"`
	Trust13                         WSTrust13                       `xml:"Trust13"`
	SignedEncryptedSupportingTokens SignedEncryptedSupportingTokens `xml:"SignedEncryptedSupportingTokens"`
}

type AppliesTo

type AppliesTo struct {
	Text              string            `xml:",chardata"`
	Wsp               string            `xml:"wsp,attr"`
	EndpointReference EndpointReference `xml:"EndpointReference"`
}

type Assertion

type Assertion struct {
	XMLName                 xml.Name                // Normally its `xml:"Assertion"`, but I think they want to capture the xmlns
	Text                    string                  `xml:",chardata"`
	MajorVersion            string                  `xml:"MajorVersion,attr"`
	MinorVersion            string                  `xml:"MinorVersion,attr"`
	AssertionID             string                  `xml:"AssertionID,attr"`
	Issuer                  string                  `xml:"Issuer,attr"`
	IssueInstant            string                  `xml:"IssueInstant,attr"`
	Saml                    string                  `xml:"saml,attr"`
	Conditions              Conditions              `xml:"Conditions"`
	AttributeStatement      AttributeStatement      `xml:"AttributeStatement"`
	AuthenticationStatement AuthenticationStatement `xml:"AuthenticationStatement"`
	Signature               Signature               `xml:"Signature"`
}

type Attribute

type Attribute struct {
	Text               string `xml:",chardata"`
	AttributeName      string `xml:"AttributeName,attr"`
	AttributeNamespace string `xml:"AttributeNamespace,attr"`
	AttributeValue     Text   `xml:"AttributeValue"`
}

type AttributeStatement

type AttributeStatement struct {
	Text      string      `xml:",chardata"`
	Subject   Subject     `xml:"Subject"`
	Attribute []Attribute `xml:"Attribute"`
}

type AudienceRestrictionCondition

type AudienceRestrictionCondition struct {
	Text     string `xml:",chardata"`
	Audience Text   `xml:"Audience"`
}

type AuthenticationStatement

type AuthenticationStatement struct {
	Text                  string  `xml:",chardata"`
	AuthenticationMethod  string  `xml:"AuthenticationMethod,attr"`
	AuthenticationInstant string  `xml:"AuthenticationInstant,attr"`
	Subject               Subject `xml:"Subject"`
}

type Binding

type Binding struct {
	Text            string             `xml:",chardata"`
	Name            string             `xml:"name,attr"`
	Type            string             `xml:"type,attr"`
	PolicyReference PolicyReference    `xml:"PolicyReference"`
	Binding         DefinitionsBinding `xml:"binding"`
	Operation       BindingOperation   `xml:"operation"`
}

type BindingOperation

type BindingOperation struct {
	Text      string                    `xml:",chardata"`
	Name      string                    `xml:"name,attr"`
	Operation BindingOperationOperation `xml:"operation"`
	Input     BindingOperationIO        `xml:"input"`
	Output    BindingOperationIO        `xml:"output"`
}

type BindingOperationIO

type BindingOperationIO struct {
	Text string          `xml:",chardata"`
	Body OperationIOBody `xml:"body"`
}

type BindingOperationOperation

type BindingOperationOperation struct {
	Text       string `xml:",chardata"`
	SoapAction string `xml:"soapAction,attr"`
	Style      string `xml:"style,attr"`
}

type Body

type Body struct {
	Text                                   string                                 `xml:",chardata"`
	RequestSecurityTokenResponseCollection RequestSecurityTokenResponseCollection `xml:"RequestSecurityTokenResponseCollection"`
}

type Conditions

type Conditions struct {
	Text                         string                       `xml:",chardata"`
	NotBefore                    string                       `xml:"NotBefore,attr"`
	NotOnOrAfter                 string                       `xml:"NotOnOrAfter,attr"`
	AudienceRestrictionCondition AudienceRestrictionCondition `xml:"AudienceRestrictionCondition"`
}

type Definitions

type Definitions struct {
	XMLName         xml.Name   `xml:"definitions"`
	Text            string     `xml:",chardata"`
	Name            string     `xml:"name,attr"`
	TargetNamespace string     `xml:"targetNamespace,attr"`
	WSDL            string     `xml:"wsdl,attr"`
	XSD             string     `xml:"xsd,attr"`
	T               string     `xml:"t,attr"`
	SOAPENC         string     `xml:"soapenc,attr"`
	SOAP            string     `xml:"soap,attr"`
	TNS             string     `xml:"tns,attr"`
	MSC             string     `xml:"msc,attr"`
	WSAM            string     `xml:"wsam,attr"`
	SOAP12          string     `xml:"soap12,attr"`
	WSA10           string     `xml:"wsa10,attr"`
	WSA             string     `xml:"wsa,attr"`
	WSAW            string     `xml:"wsaw,attr"`
	WSX             string     `xml:"wsx,attr"`
	WSAP            string     `xml:"wsap,attr"`
	WSU             string     `xml:"wsu,attr"`
	Trust           string     `xml:"trust,attr"`
	WSP             string     `xml:"wsp,attr"`
	Policy          []Policy   `xml:"Policy"`
	Types           Types      `xml:"types"`
	Message         []Message  `xml:"message"`
	PortType        []PortType `xml:"portType"`
	Binding         []Binding  `xml:"binding"`
	Service         Service    `xml:"service"`
}

type DefinitionsBinding

type DefinitionsBinding struct {
	Text      string `xml:",chardata"`
	Transport string `xml:"transport,attr"`
}

type EndorsingSupportingTokens

type EndorsingSupportingTokens struct {
	Text   string                          `xml:",chardata"`
	SP     string                          `xml:"sp,attr"`
	Policy EndorsingSupportingTokensPolicy `xml:"Policy"`
}

type EndorsingSupportingTokensPolicy

type EndorsingSupportingTokensPolicy struct {
	Text          string        `xml:",chardata"`
	X509Token     X509Token     `xml:"X509Token"`
	RSAToken      RSAToken      `xml:"RsaToken"`
	SignedParts   SignedParts   `xml:"SignedParts"`
	KerberosToken KerberosToken `xml:"KerberosToken"`
	IssuedToken   IssuedToken   `xml:"IssuedToken"`
	KeyValueToken KeyValueToken `xml:"KeyValueToken"`
}

type Endpoint

type Endpoint struct {
	// Version is the version of the endpoint.
	Version Version
	// URL is the URL of the endpoint.
	URL string
}

Endpoint represents a WSTrust endpoint.

func (*Endpoint) BuildTokenRequestMessageUsernamePassword

func (wte *Endpoint) BuildTokenRequestMessageUsernamePassword(cloudAudienceURN string, username string, password string) (string, error)

func (*Endpoint) BuildTokenRequestMessageWIA

func (wte *Endpoint) BuildTokenRequestMessageWIA(cloudAudienceURN string) (string, error)

type EndpointReference

type EndpointReference struct {
	Text    string `xml:",chardata"`
	Wsa     string `xml:"wsa,attr"`
	Address Text   `xml:"Address"`
}

type ExactlyOne

type ExactlyOne struct {
	Text string `xml:",chardata"`
	All  All    `xml:"All"`
}

type HTTPSToken

type HTTPSToken struct {
	Text                     string `xml:",chardata"`
	RequireClientCertificate string `xml:"RequireClientCertificate,attr"`
}
type Header struct {
	Text     string   `xml:",chardata"`
	Action   Action   `xml:"Action"`
	Security Security `xml:"Security"`
}

type Identity

type Identity struct {
	Text  string `xml:",chardata"`
	XMLNS string `xml:"xmlns,attr"`
	SPN   Text   `xml:"Spn"`
}

type Import

type Import struct {
	Text           string `xml:",chardata"`
	SchemaLocation string `xml:"schemaLocation,attr"`
	Namespace      string `xml:"namespace,attr"`
}

type IssuedToken

type IssuedToken struct {
	Text                         string                       `xml:",chardata"`
	IncludeToken                 string                       `xml:"IncludeToken,attr"`
	RequestSecurityTokenTemplate RequestSecurityTokenTemplate `xml:"RequestSecurityTokenTemplate"`
	Policy                       IssuedTokenPolicy            `xml:"Policy"`
}

type IssuedTokenPolicy

type IssuedTokenPolicy struct {
	Text                     string `xml:",chardata"`
	RequireInternalReference Text   `xml:"RequireInternalReference"`
}

type KerberosToken

type KerberosToken struct {
	Text         string              `xml:",chardata"`
	IncludeToken string              `xml:"IncludeToken,attr"`
	Policy       KerberosTokenPolicy `xml:"Policy"`
}

type KerberosTokenPolicy

type KerberosTokenPolicy struct {
	Text                         string `xml:",chardata"`
	WSSGSSKerberosV5ApReqToken11 Text   `xml:"WssGssKerberosV5ApReqToken11"`
}

type KeyIdentifier

type KeyIdentifier struct {
	Text      string `xml:",chardata"`
	ValueType string `xml:"ValueType,attr"`
}

type KeyInfo

type KeyInfo struct {
	Text     string   `xml:",chardata"`
	Xmlns    string   `xml:"xmlns,attr"`
	X509Data X509Data `xml:"X509Data"`
}

type KeyValueToken

type KeyValueToken struct {
	Text         string `xml:",chardata"`
	IncludeToken string `xml:"IncludeToken,attr"`
	Optional     string `xml:"Optional,attr"`
}

type Layout

type Layout struct {
	Text   string       `xml:",chardata"`
	Policy LayoutPolicy `xml:"Policy"`
}

type LayoutPolicy

type LayoutPolicy struct {
	Text   string `xml:",chardata"`
	Strict Text   `xml:"Strict"`
}

type Lifetime

type Lifetime struct {
	Text    string       `xml:",chardata"`
	Created WSUTimestamp `xml:"Created"`
	Expires WSUTimestamp `xml:"Expires"`
}

type Message

type Message struct {
	Text string `xml:",chardata"`
	Name string `xml:"name,attr"`
	Part Part   `xml:"part"`
}

type Method

type Method struct {
	Text      string `xml:",chardata"`
	Algorithm string `xml:"Algorithm,attr"`
}

type MexDocument

type MexDocument struct {
	UsernamePasswordEndpoint Endpoint
	WindowsTransportEndpoint Endpoint
	// contains filtered or unexported fields
}

func NewFromDef

func NewFromDef(defs Definitions) (MexDocument, error)

NewFromDef creates a new MexDocument.

type NameIdentifier

type NameIdentifier struct {
	Text   string `xml:",chardata"`
	Format string `xml:"Format,attr"`
}

type NegotiateAuthentication

type NegotiateAuthentication struct {
	Text    string `xml:",chardata"`
	HTTP    string `xml:"http,attr"`
	XMLName xml.Name
}

type Operation

type Operation struct {
	Text   string      `xml:",chardata"`
	Name   string      `xml:"name,attr"`
	Input  OperationIO `xml:"input"`
	Output OperationIO `xml:"output"`
}

type OperationIO

type OperationIO struct {
	Text    string          `xml:",chardata"`
	Action  string          `xml:"Action,attr"`
	Message string          `xml:"message,attr"`
	Body    OperationIOBody `xml:"body"`
}

type OperationIOBody

type OperationIOBody struct {
	Text string `xml:",chardata"`
	Use  string `xml:"use,attr"`
}

type Part

type Part struct {
	Text    string `xml:",chardata"`
	Name    string `xml:"name,attr"`
	Element string `xml:"element,attr"`
}

type Policy

type Policy struct {
	Text       string     `xml:",chardata"`
	ID         string     `xml:"Id,attr"`
	ExactlyOne ExactlyOne `xml:"ExactlyOne"`
}

type PolicyReference

type PolicyReference struct {
	Text string `xml:",chardata"`
	URI  string `xml:"URI,attr"`
}

type Port

type Port struct {
	Text              string                `xml:",chardata"`
	Name              string                `xml:"name,attr"`
	Binding           string                `xml:"binding,attr"`
	Address           Address               `xml:"address"`
	EndpointReference PortEndpointReference `xml:"EndpointReference"`
}

type PortEndpointReference

type PortEndpointReference struct {
	Text     string   `xml:",chardata"`
	Address  Text     `xml:"Address"`
	Identity Identity `xml:"Identity"`
}

type PortType

type PortType struct {
	Text      string    `xml:",chardata"`
	Name      string    `xml:"name,attr"`
	Operation Operation `xml:"operation"`
}

type RSAToken

type RSAToken struct {
	Text         string `xml:",chardata"`
	IncludeToken string `xml:"IncludeToken,attr"`
	Optional     string `xml:"Optional,attr"`
	MSSP         string `xml:"mssp,attr"`
}

type Reference

type Reference struct {
	Text         string     `xml:",chardata"`
	URI          string     `xml:"URI,attr"`
	Transforms   Transforms `xml:"Transforms"`
	DigestMethod Method     `xml:"DigestMethod"`
	DigestValue  Text       `xml:"DigestValue"`
}

type RequestSecurityTokenResponse

type RequestSecurityTokenResponse struct {
	Text                         string                       `xml:",chardata"`
	Lifetime                     Lifetime                     `xml:"Lifetime"`
	AppliesTo                    AppliesTo                    `xml:"AppliesTo"`
	RequestedSecurityToken       RequestedSecurityToken       `xml:"RequestedSecurityToken"`
	RequestedAttachedReference   RequestedAttachedReference   `xml:"RequestedAttachedReference"`
	RequestedUnattachedReference RequestedUnattachedReference `xml:"RequestedUnattachedReference"`
	TokenType                    Text                         `xml:"TokenType"`
	RequestType                  Text                         `xml:"RequestType"`
	KeyType                      Text                         `xml:"KeyType"`
}

type RequestSecurityTokenResponseCollection

type RequestSecurityTokenResponseCollection struct {
	Text                         string                         `xml:",chardata"`
	Trust                        string                         `xml:"trust,attr"`
	RequestSecurityTokenResponse []RequestSecurityTokenResponse `xml:"RequestSecurityTokenResponse"`
}

type RequestSecurityTokenTemplate

type RequestSecurityTokenTemplate struct {
	Text                      string `xml:",chardata"`
	KeyType                   Text   `xml:"KeyType"`
	EncryptWith               Text   `xml:"EncryptWith"`
	SignatureAlgorithm        Text   `xml:"SignatureAlgorithm"`
	CanonicalizationAlgorithm Text   `xml:"CanonicalizationAlgorithm"`
	EncryptionAlgorithm       Text   `xml:"EncryptionAlgorithm"`
	KeySize                   Text   `xml:"KeySize"`
	KeyWrapAlgorithm          Text   `xml:"KeyWrapAlgorithm"`
}

type RequestedAttachedReference

type RequestedAttachedReference struct {
	Text                   string                 `xml:",chardata"`
	SecurityTokenReference SecurityTokenReference `xml:"SecurityTokenReference"`
}

type RequestedSecurityToken

type RequestedSecurityToken struct {
	Text            string    `xml:",chardata"`
	AssertionRawXML string    `xml:",innerxml"`
	Assertion       Assertion `xml:"Assertion"`
}

type RequestedUnattachedReference

type RequestedUnattachedReference struct {
	Text                   string                 `xml:",chardata"`
	SecurityTokenReference SecurityTokenReference `xml:"SecurityTokenReference"`
}

type SAMLDefinitions

type SAMLDefinitions struct {
	XMLName xml.Name `xml:"Envelope"`
	Text    string   `xml:",chardata"`
	S       string   `xml:"s,attr"`
	A       string   `xml:"a,attr"`
	U       string   `xml:"u,attr"`
	Header  Header   `xml:"Header"`
	Body    Body     `xml:"Body"`
}

type Schema

type Schema struct {
	Text            string   `xml:",chardata"`
	TargetNamespace string   `xml:"targetNamespace,attr"`
	Import          []Import `xml:"import"`
}

type Security

type Security struct {
	Text           string    `xml:",chardata"`
	MustUnderstand string    `xml:"mustUnderstand,attr"`
	O              string    `xml:"o,attr"`
	Timestamp      Timestamp `xml:"Timestamp"`
}

type SecurityTokenReference

type SecurityTokenReference struct {
	Text          string        `xml:",chardata"`
	TokenType     string        `xml:"TokenType,attr"`
	O             string        `xml:"o,attr"`
	K             string        `xml:"k,attr"`
	KeyIdentifier KeyIdentifier `xml:"KeyIdentifier"`
}

type Service

type Service struct {
	Text string `xml:",chardata"`
	Name string `xml:"name,attr"`
	Port []Port `xml:"port"`
}

type Signature

type Signature struct {
	Text           string     `xml:",chardata"`
	Ds             string     `xml:"ds,attr"`
	SignedInfo     SignedInfo `xml:"SignedInfo"`
	SignatureValue Text       `xml:"SignatureValue"`
	KeyInfo        KeyInfo    `xml:"KeyInfo"`
}

type SignedEncryptedSupportingTokens

type SignedEncryptedSupportingTokens struct {
	Text   string                 `xml:",chardata"`
	SP     string                 `xml:"sp,attr"`
	Policy SupportingTokensPolicy `xml:"Policy"`
}

type SignedInfo

type SignedInfo struct {
	Text                   string    `xml:",chardata"`
	CanonicalizationMethod Method    `xml:"CanonicalizationMethod"`
	SignatureMethod        Method    `xml:"SignatureMethod"`
	Reference              Reference `xml:"Reference"`
}

type SignedParts

type SignedParts struct {
	Text   string            `xml:",chardata"`
	Header SignedPartsHeader `xml:"Header"`
}

type SignedPartsHeader

type SignedPartsHeader struct {
	Text      string `xml:",chardata"`
	Name      string `xml:"Name,attr"`
	Namespace string `xml:"Namespace,attr"`
}

type SignedSupportingTokens

type SignedSupportingTokens struct {
	Text   string                 `xml:",chardata"`
	SP     string                 `xml:"sp,attr"`
	Policy SupportingTokensPolicy `xml:"Policy"`
}

type Subject

type Subject struct {
	Text                string              `xml:",chardata"`
	NameIdentifier      NameIdentifier      `xml:"NameIdentifier"`
	SubjectConfirmation SubjectConfirmation `xml:"SubjectConfirmation"`
}

type SubjectConfirmation

type SubjectConfirmation struct {
	Text               string `xml:",chardata"`
	ConfirmationMethod Text   `xml:"ConfirmationMethod"`
}

type SupportingTokensPolicy

type SupportingTokensPolicy struct {
	Text          string        `xml:",chardata"`
	UsernameToken UsernameToken `xml:"UsernameToken"`
}

type Text

type Text struct {
	Text string `xml:",chardata"`
}

type Timestamp

type Timestamp struct {
	Text    string `xml:",chardata"`
	ID      string `xml:"Id,attr"`
	Created Text   `xml:"Created"`
	Expires Text   `xml:"Expires"`
}

type Transforms

type Transforms struct {
	Text      string   `xml:",chardata"`
	Transform []Method `xml:"Transform"`
}

type TransportBinding

type TransportBinding struct {
	Text   string                 `xml:",chardata"`
	SP     string                 `xml:"sp,attr"`
	Policy TransportBindingPolicy `xml:"Policy"`
}

type TransportBindingPolicy

type TransportBindingPolicy struct {
	Text             string         `xml:",chardata"`
	TransportToken   TransportToken `xml:"TransportToken"`
	AlgorithmSuite   AlgorithmSuite `xml:"AlgorithmSuite"`
	Layout           Layout         `xml:"Layout"`
	IncludeTimestamp Text           `xml:"IncludeTimestamp"`
}

type TransportToken

type TransportToken struct {
	Text   string               `xml:",chardata"`
	Policy TransportTokenPolicy `xml:"Policy"`
}

type TransportTokenPolicy

type TransportTokenPolicy struct {
	Text       string     `xml:",chardata"`
	HTTPSToken HTTPSToken `xml:"HttpsToken"`
}

type Trust10

type Trust10 struct {
	Text   string        `xml:",chardata"`
	SP     string        `xml:"sp,attr"`
	Policy Trust10Policy `xml:"Policy"`
}

type Trust10Policy

type Trust10Policy struct {
	Text                    string `xml:",chardata"`
	MustSupportIssuedTokens Text   `xml:"MustSupportIssuedTokens"`
	RequireClientEntropy    Text   `xml:"RequireClientEntropy"`
	RequireServerEntropy    Text   `xml:"RequireServerEntropy"`
}

type Types

type Types struct {
	Text   string `xml:",chardata"`
	Schema Schema `xml:"schema"`
}

type UsernameToken

type UsernameToken struct {
	Text         string              `xml:",chardata"`
	IncludeToken string              `xml:"IncludeToken,attr"`
	Policy       UsernameTokenPolicy `xml:"Policy"`
}

type UsernameTokenPolicy

type UsernameTokenPolicy struct {
	Text               string             `xml:",chardata"`
	WSSUsernameToken10 WSSUsernameToken10 `xml:"WssUsernameToken10"`
}

type Version

type Version int
const (
	TrustUnknown Version = iota
	Trust2005
	Trust13
)

func (Version) String

func (i Version) String() string

type WSS11

type WSS11 struct {
	Text   string      `xml:",chardata"`
	SP     string      `xml:"sp,attr"`
	Policy Wss11Policy `xml:"Policy"`
}

type WSSUsernameToken10

type WSSUsernameToken10 struct {
	Text    string `xml:",chardata"`
	XMLName xml.Name
}

type WSTrust13

type WSTrust13 struct {
	Text   string          `xml:",chardata"`
	SP     string          `xml:"sp,attr"`
	Policy WSTrust13Policy `xml:"Policy"`
}

type WSTrust13Policy

type WSTrust13Policy struct {
	Text                    string `xml:",chardata"`
	MustSupportIssuedTokens Text   `xml:"MustSupportIssuedTokens"`
	RequireClientEntropy    Text   `xml:"RequireClientEntropy"`
	RequireServerEntropy    Text   `xml:"RequireServerEntropy"`
}

type WSUTimestamp

type WSUTimestamp struct {
	Text string `xml:",chardata"`
	Wsu  string `xml:"wsu,attr"`
}

type Wss11Policy

type Wss11Policy struct {
	Text                     string `xml:",chardata"`
	MustSupportRefThumbprint Text   `xml:"MustSupportRefThumbprint"`
}

type X509Data

type X509Data struct {
	Text            string `xml:",chardata"`
	X509Certificate Text   `xml:"X509Certificate"`
}

type X509Token

type X509Token struct {
	Text         string          `xml:",chardata"`
	IncludeToken string          `xml:"IncludeToken,attr"`
	Policy       X509TokenPolicy `xml:"Policy"`
}

type X509TokenPolicy

type X509TokenPolicy struct {
	Text                       string `xml:",chardata"`
	RequireThumbprintReference Text   `xml:"RequireThumbprintReference"`
	WSSX509V3Token10           Text   `xml:"WssX509V3Token10"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL