saml

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2019 License: Apache-2.0 Imports: 6 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewID

func NewID() string

Types

type ArtifactResolutionService

type ArtifactResolutionService struct {
	XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata ArtifactResolutionService"`
	Service
	Index uint `xml:"index,attr"`
}

type ArtifactResolve

type ArtifactResolve struct {
	RequestAbstractType
	XMLName   xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:protocol ArtifactResolve"`
	Artifact  string   `xml:"urn:oasis:names:tc:SAML:2.0:protocol Artifact"`
	Signature *xmlsig.Signature
}

type ArtifactResolveBody

type ArtifactResolveBody struct {
	XMLName         xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
	ArtifactResolve ArtifactResolve
}

type ArtifactResolveEnvelope

type ArtifactResolveEnvelope struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
	Body    ArtifactResolveBody
}

type ArtifactResponse

type ArtifactResponse struct {
	StatusResponseType
	XMLName  xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:protocol ArtifactResponse"`
	Response Response
}

type ArtifactResponseBody

type ArtifactResponseBody struct {
	XMLName          xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
	ArtifactResponse ArtifactResponse
}

type ArtifactResponseEnvelope

type ArtifactResponseEnvelope struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
	Body    ArtifactResponseBody
}

type Assertion

type Assertion struct {
	XMLName            xml.Name  `xml:"urn:oasis:names:tc:SAML:2.0:assertion Assertion"`
	ID                 string    `xml:",attr"`
	Version            string    `xml:",attr"`
	IssueInstant       time.Time `xml:",attr"`
	Issuer             *Issuer
	Signature          *xmlsig.Signature
	Subject            *Subject
	Conditions         *Conditions
	AuthnStatement     *AuthnStatement
	AttributeStatement *AttributeStatement
	RawXML             string `xml:"-"`
}

type AssertionConsumerService

type AssertionConsumerService struct {
	XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata AssertionConsumerService"`
	Service
	IsDefault bool   `xml:"isDefault,attr"`
	Index     uint32 `xml:"index,attr"`
}

type Attribute

type Attribute struct {
	XMLName        xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:assertion Attribute"`
	FriendlyName   string   `xml:",attr"`
	Name           string   `xml:",attr"`
	NameFormat     string   `xml:",attr"`
	AttributeValue []AttributeValue
}

type AttributeAuthorityDescriptor

type AttributeAuthorityDescriptor struct {
	XMLName                    xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata AttributeAuthorityDescriptor"`
	ProtocolSupportEnumeration string   `xml:"protocolSupportEnumeration,attr"`
	KeyDescriptor              KeyDescriptor
	AttributeService           AttributeService
	NameIDFormat               string `xml:"NameIDFormat"`
}

type AttributeQuery added in v0.4.0

type AttributeQuery struct {
	RequestAbstractType
	XMLName   xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:protocol AttributeQuery"`
	Subject   Subject
	Signature *xmlsig.Signature
}

type AttributeQueryBody added in v0.4.0

type AttributeQueryBody struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
	Query   AttributeQuery
}

type AttributeQueryEnv added in v0.4.0

type AttributeQueryEnv struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
	Body    AttributeQueryBody
}

type AttributeRespBody added in v0.4.0

type AttributeRespBody struct {
	XMLName  xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
	Response Response
}

type AttributeRespEnv added in v0.4.0

type AttributeRespEnv struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
	Body    AttributeRespBody
}

type AttributeService

type AttributeService struct {
	XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata AttributeService"`
	Service
}

type AttributeStatement

type AttributeStatement struct {
	XMLName   xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:assertion AttributeStatement"`
	Attribute []Attribute
}

type AttributeValue

type AttributeValue struct {
	XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:assertion AttributeValue"`
	Value   string   `xml:",chardata"`
}

type AudienceRestriction

type AudienceRestriction struct {
	XMLName  xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:assertion AudienceRestriction"`
	Audience string   `xml:"urn:oasis:names:tc:SAML:2.0:assertion Audience"`
}

type AuthnContext

type AuthnContext struct {
	XMLName              xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:assertion AuthnContext"`
	AuthnContextClassRef string   `xml:"urn:oasis:names:tc:SAML:2.0:assertion AuthnContextClassRef"`
}

type AuthnRequest

type AuthnRequest struct {
	RequestAbstractType
	XMLName                       xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:protocol AuthnRequest"`
	AssertionConsumerServiceURL   string   `xml:",attr"`
	ProtocolBinding               string   `xml:",attr"`
	AssertionConsumerServiceIndex uint32   `xml:",attr"`
}

type AuthnStatement

type AuthnStatement struct {
	XMLName         xml.Name  `xml:"urn:oasis:names:tc:SAML:2.0:assertion AuthnStatement"`
	AuthnInstant    time.Time `xml:",attr"`
	SessionIndex    string    `xml:",attr"`
	SubjectLocality *SubjectLocality
	AuthnContext    *AuthnContext
}

type Conditions

type Conditions struct {
	XMLName             xml.Name  `xml:"urn:oasis:names:tc:SAML:2.0:assertion Conditions"`
	NotBefore           time.Time `xml:",attr"`
	NotOnOrAfter        time.Time `xml:",attr"`
	AudienceRestriction *AudienceRestriction
}

type ECPRequestAuthenticated added in v0.8.0

type ECPRequestAuthenticated struct {
	XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp RequestAuthenticated"`
	Actor   string   `xml:"http://schemas.xmlsoap.org/soap/envelope/ actor,attr"`
}

type ECPResponse added in v0.8.0

type ECPResponse struct {
	XMLName                     xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:profiles:SSO:ecp Response"`
	Actor                       string   `xml:"http://schemas.xmlsoap.org/soap/envelope/ actor,attr"`
	MustUnderstand              int      `xml:"http://schemas.xmlsoap.org/soap/envelope/ mustUnderstand,attr"`
	AssertionConsumerServiceURL string   `xml:",attr"`
}

type ECPResponseBody added in v0.8.0

type ECPResponseBody struct {
	XMLName  xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
	Response Response
}

type ECPResponseEnvelope added in v0.8.0

type ECPResponseEnvelope struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
	Header  ECPResponseHeader
	Body    ECPResponseBody
}

type ECPResponseHeader added in v0.8.0

type ECPResponseHeader struct {
	XMLName                 xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Header"`
	ECPResponse             ECPResponse
	ECPRequestAuthenticated ECPRequestAuthenticated
}

type EntityDescriptor

type EntityDescriptor struct {
	XMLName   xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata EntityDescriptor"`
	ID        string   `xml:",attr"`
	EntityID  string   `xml:"entityID,attr"`
	Signature *xmlsig.Signature
}

type IDPEntityDescriptor

type IDPEntityDescriptor struct {
	EntityDescriptor
	IDPSSODescriptor             IDPSSODescriptor
	AttributeAuthorityDescriptor AttributeAuthorityDescriptor
}

type IDPSSODescriptor

type IDPSSODescriptor struct {
	XMLName                    xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata IDPSSODescriptor"`
	ProtocolSupportEnumeration string   `xml:"protocolSupportEnumeration,attr"`
	WantAuthnRequestsSigned    bool     `xml:",attr"`
	KeyDescriptor              KeyDescriptor
	ArtifactResolutionService  ArtifactResolutionService
	NameIDFormat               string `xml:"NameIDFormat"`
	SingleSignOnService        []SingleSignOnService
}

type Issuer

type Issuer struct {
	XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:assertion Issuer"`
	Format  string   `xml:",attr"`
	Value   string   `xml:",chardata"`
}

func NewIssuer

func NewIssuer(issuer string) *Issuer

type KeyDescriptor

type KeyDescriptor struct {
	XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata KeyDescriptor"`
	Use     string   `xml:"use,attr,omitempty"`
	KeyInfo xmlsig.KeyInfo
}

type NameID

type NameID struct {
	XMLName         xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:assertion NameID"`
	Format          string   `xml:",attr"`
	NameQualifier   string   `xml:",attr"`
	SPNameQualifier string   `xml:",attr"`
	Value           string   `xml:",chardata"`
}

type RequestAbstractType

type RequestAbstractType struct {
	ID           string    `xml:",attr"`
	Version      string    `xml:",attr"`
	IssueInstant time.Time `xml:",attr"`
	Issuer       string    `xml:"urn:oasis:names:tc:SAML:2.0:assertion Issuer"`
	Destination  string    `xml:",attr"`
}

type Response

type Response struct {
	StatusResponseType
	XMLName      xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:protocol Response"`
	RawAssertion string   `xml:",innerxml"`
	Assertion    *Assertion
}

type SOAPFault added in v0.8.0

type SOAPFault struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Fault"`
	Code    string   `xml:",faultcode"`
	String  string   `xml:",faultstring"`
}

type SOAPFaultBody added in v0.8.0

type SOAPFaultBody struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Body"`
	Fault   SOAPFault
}

type SOAPFaultEnvelope added in v0.8.0

type SOAPFaultEnvelope struct {
	XMLName xml.Name `xml:"http://schemas.xmlsoap.org/soap/envelope/ Envelope"`
	Body    SOAPFaultBody
}

type SPEntityDescriptor

type SPEntityDescriptor struct {
	EntityDescriptor
	SPSSODescriptor SPSSODescriptor
}

type SPSSODescriptor

type SPSSODescriptor struct {
	XMLName                    xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata SPSSODescriptor"`
	AuthnRequestsSigned        bool     `xml:",attr"`
	WantAssertionsSigned       bool     `xml:",attr"`
	ProtocolSupportEnumeration string   `xml:"protocolSupportEnumeration,attr"`
	AssertionConsumerService   []AssertionConsumerService
	KeyDescriptor              KeyDescriptor
}

type Service

type Service struct {
	Binding  string `xml:",attr"`
	Location string `xml:",attr"`
}

type SingleSignOnService

type SingleSignOnService struct {
	XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:metadata SingleSignOnService"`
	Service
}

type Status

type Status struct {
	XMLName    xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:protocol Status"`
	StatusCode StatusCode
}

type StatusCode

type StatusCode struct {
	XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:protocol StatusCode"`
	Value   string   `xml:",attr"`
}

type StatusResponseType

type StatusResponseType struct {
	ID           string    `xml:",attr"`
	Version      string    `xml:",attr"`
	IssueInstant time.Time `xml:",attr"`
	Issuer       *Issuer
	Destination  string `xml:",attr,omitempty"`
	InResponseTo string `xml:",attr"`
	Status       *Status
}

type Subject

type Subject struct {
	XMLName             xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:assertion Subject"`
	NameID              *NameID
	SubjectConfirmation *SubjectConfirmation
}

type SubjectConfirmation

type SubjectConfirmation struct {
	XMLName                 xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:assertion SubjectConfirmation"`
	Method                  string   `xml:",attr"`
	SubjectConfirmationData *SubjectConfirmationData
}

type SubjectConfirmationData

type SubjectConfirmationData struct {
	XMLName      xml.Name  `xml:"urn:oasis:names:tc:SAML:2.0:assertion SubjectConfirmationData"`
	Address      net.IP    `xml:",attr"`
	InResponseTo string    `xml:",attr"`
	NotOnOrAfter time.Time `xml:",attr"`
	Recipient    string    `xml:",attr"`
}

type SubjectLocality

type SubjectLocality struct {
	XMLName xml.Name `xml:"urn:oasis:names:tc:SAML:2.0:assertion SubjectLocality"`
	Address net.IP   `xml:",attr,omitempty"`
	DNSName string   `xml:",attr,omitempty"`
}

Jump to

Keyboard shortcuts

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