Documentation
¶
Index ¶
- Variables
- type Assertion
- type AssertionConsumerService
- type Attribute
- type AttributeStatement
- type AttributeValue
- type Audience
- type AudienceRestriction
- type AuthnContext
- type AuthnContextClassRef
- type AuthnRequest
- type AuthnStatement
- type CanonicalizationMethod
- type Conditions
- type ContactPerson
- type DigestMethod
- type DigestValue
- type EntityAttributes
- type EntityDescriptor
- type Extensions
- type IDPEntityDescriptor
- type IDPSSODescriptor
- type Issuer
- type KeyDescriptor
- type KeyInfo
- type LogoutRequest
- type LogoutResponse
- func (r *LogoutResponse) SetDigestAlgorithm(alg string)
- func (r *LogoutResponse) SetInResponseTo(inResponseTo string)
- func (r *LogoutResponse) SetSignatureAlgorithm(alg string)
- func (r *LogoutResponse) SignedXml(idpPrivateKey interface{}) (string, error)
- func (r *LogoutResponse) String() (string, error)
- type NameID
- type NameIDPolicy
- type Organization
- type RequestedAuthnContext
- type Response
- func (r *Response) AddAttributes(attributes []map[string]string)
- func (r *Response) AddAudience(audiences []string)
- func (r *Response) SetDestination(destination string)
- func (r *Response) SetDigestAlgorithm(alg string)
- func (r *Response) SetIdpCertificate(certPem string)
- func (r *Response) SetInResponseTo(inResponseTo string)
- func (r *Response) SetIssuer(issuer string)
- func (r *Response) SetNameId(format string, value string)
- func (r *Response) SetSessionIndex(sessionIndex string)
- func (r *Response) SetSignatureAlgorithm(alg string)
- func (r *Response) SignedXml(idpPrivateKey interface{}) (string, error)
- func (r *Response) String() (string, error)
- type SPSSODescriptor
- type SPSSODescriptors
- type SamlsigReference
- type SessionIndex
- type Signature
- type SignatureMethod
- type SignatureValue
- type SignedInfo
- type SingleLogoutService
- type SingleSignOnService
- type Status
- type StatusCode
- type Subject
- type SubjectConfirmation
- type SubjectConfirmationData
- type Transform
- type Transforms
- type X509Certificate
- type X509Data
Constants ¶
This section is empty.
Variables ¶
View Source
var MaxIssueDelay = time.Minute * 10
Functions ¶
This section is empty.
Types ¶
type Assertion ¶
type Assertion struct {
XMLName xml.Name
ID string `xml:"ID,attr"`
Version string `xml:"Version,attr"`
XSI string `xml:"xmlns:xsi,attr"`
XS string `xml:"xmlns:xs,attr"`
SAML string `xml:"xmlns:saml,attr"`
IssueInstant string `xml:"IssueInstant,attr"`
Issuer Issuer `xml:"Issuer"`
Signature Signature `xml:"Signature"`
Subject Subject
Conditions Conditions
AuthnStatement AuthnStatement `xml:"AuthnStatement,omitempty"`
AttributeStatement AttributeStatement
}
type AttributeStatement ¶
type AttributeValue ¶
type AudienceRestriction ¶
type AuthnContext ¶
type AuthnContext struct {
XMLName xml.Name
AuthnContextClassRef AuthnContextClassRef `xml:"AuthnContextClassRef"`
}
type AuthnContextClassRef ¶
type AuthnRequest ¶
type AuthnRequest struct {
XMLName xml.Name
SAMLP string `xml:"xmlns:samlp,attr"`
SAML string `xml:"xmlns:saml,attr"`
ID string `xml:"ID,attr"`
Version string `xml:"Version,attr"`
ProtocolBinding string `xml:"ProtocolBinding,attr"`
AssertionConsumerServiceURL string `xml:"AssertionConsumerServiceURL,attr"`
Destination string `xml:"Destination,attr"`
IssueInstant time.Time `xml:"IssueInstant,attr"`
AssertionConsumerServiceIndex int `xml:"AssertionConsumerServiceIndex,attr"`
AttributeConsumingServiceIndex int `xml:"AttributeConsumingServiceIndex,attr"`
Issuer Issuer `xml:"Issuer"`
NameIDPolicy NameIDPolicy `xml:"NameIDPolicy"`
RequestedAuthnContext RequestedAuthnContext `xml:"RequestedAuthnContext"`
Signature *Signature `xml:"Signature,omitempty"`
ForceAuthn string `xml:"ForceAuthn"`
IsPassive string `xml:"IsPassive"`
ProviderName string `xml:"ProviderName"`
}
func (*AuthnRequest) Validate ¶
func (a *AuthnRequest) Validate() error
type AuthnStatement ¶
type CanonicalizationMethod ¶
type Conditions ¶
type Conditions struct {
XMLName xml.Name
NotBefore string `xml:",attr"`
NotOnOrAfter string `xml:",attr"`
AudienceRestriction AudienceRestriction `xml:"AudienceRestriction,omitempty"`
}
type ContactPerson ¶
type DigestMethod ¶
type DigestValue ¶
type EntityAttributes ¶
type EntityDescriptor ¶
type EntityDescriptor struct {
XMLName xml.Name
DS string `xml:"xmlns:ds,attr"`
XMLNS string `xml:"xmlns,attr"`
MD string `xml:"xmlns:md,attr"`
EntityId string `xml:"entityID,attr"`
Extensions Extensions `xml:"Extensions"`
SPSSODescriptor SPSSODescriptor `xml:"SPSSODescriptor"`
}
type Extensions ¶
type IDPEntityDescriptor ¶
type IDPEntityDescriptor struct {
XMLName xml.Name
DS string `xml:"xmlns:ds,attr"`
XMLNS string `xml:"xmlns,attr"`
ASSERTION string `xml:"xmlns:assertion,attr"`
EntityId string `xml:"entityID,attr"`
IDPSSODescriptor IDPSSODescriptor `xml:"IDPSSODescriptor"`
Organization *Organization `xml:"Organization"`
ContactPerson *[]ContactPerson `xml:"ContactPerson"`
}
func GetIdpEntityDescriptor ¶
func GetIdpEntityDescriptor() *IDPEntityDescriptor
type IDPSSODescriptor ¶
type IDPSSODescriptor struct {
XMLName xml.Name
WantAuthnRequestsSigned string `xml:"WantAuthnRequestsSigned,attr"`
ProtocolSupportEnumeration string `xml:"protocolSupportEnumeration,attr"`
SigningKeyDescriptor KeyDescriptor
SingleSignOnService []SingleSignOnService `xml:"SingleSignOnService"`
SingleLogoutService []SingleLogoutService `xml:"SingleLogoutService"`
}
type KeyDescriptor ¶
type LogoutRequest ¶
type LogoutRequest struct {
XMLName xml.Name
XMLNS string `xml:"xmlns:samlp,attr"`
ID string `xml:"ID,attr"`
Version string `xml:"Version,attr"`
IssueInstant string `xml:"IssueInstant,attr"`
NotOnOrAfter string `xml:"NotOnOrAfter,attr"`
Destination string `xml:"Destination,attr"`
Issuer Issuer `xml:"Issuer"`
Signature *Signature `xml:"Signature,omitempty"`
NameID NameID `xml:"NameID"`
SessionIndex SessionIndex `xml:"SessionIndex"`
}
func NewLogoutRequest ¶
func NewLogoutRequest() *LogoutRequest
func (*LogoutRequest) SignedXml ¶
func (r *LogoutRequest) SignedXml(idpPrivateKey *rsa.PrivateKey) (string, error)
func (*LogoutRequest) String ¶
func (r *LogoutRequest) String() (string, error)
func (*LogoutRequest) Validate ¶
func (r *LogoutRequest) Validate() error
type LogoutResponse ¶
type LogoutResponse struct {
XMLName xml.Name
XMLNSP string `xml:"xmlns:samlp,attr"`
XMLNSL string `xml:"xmlns:saml,attr"`
ID string `xml:"ID,attr"`
Version string `xml:"Version,attr"`
IssueInstant string `xml:"IssueInstant,attr"`
Destination string `xml:"Destination,attr"`
InResponseTo string `xml:"InResponseTo,attr,omitempty"`
Issuer Issuer `xml:"Issuer"`
Signature *Signature `xml:"Signature,omitempty"`
Status Status `xml:"Status"`
}
func NewLogoutResponse ¶
func NewLogoutResponse() *LogoutResponse
func (*LogoutResponse) SetDigestAlgorithm ¶
func (r *LogoutResponse) SetDigestAlgorithm(alg string)
func (*LogoutResponse) SetInResponseTo ¶
func (r *LogoutResponse) SetInResponseTo(inResponseTo string)
func (*LogoutResponse) SetSignatureAlgorithm ¶
func (r *LogoutResponse) SetSignatureAlgorithm(alg string)
func (*LogoutResponse) SignedXml ¶
func (r *LogoutResponse) SignedXml(idpPrivateKey interface{}) (string, error)
func (*LogoutResponse) String ¶
func (r *LogoutResponse) String() (string, error)
type NameIDPolicy ¶
type Organization ¶
type RequestedAuthnContext ¶
type RequestedAuthnContext struct {
XMLName xml.Name
SAMLP string `xml:"xmlns:samlp,attr"`
Comparison string `xml:"Comparison,attr"`
AuthnContextClassRef AuthnContextClassRef `xml:"AuthnContextClassRef"`
}
type Response ¶
type Response struct {
XMLName xml.Name
SAMLP string `xml:"xmlns:samlp,attr"`
SAML string `xml:"xmlns:saml,attr"`
Destination string `xml:"Destination,attr"`
ID string `xml:"ID,attr"`
Version string `xml:"Version,attr"`
IssueInstant string `xml:"IssueInstant,attr"`
InResponseTo string `xml:"InResponseTo,attr,omitempty"`
Issuer Issuer `xml:"Issuer"`
Status Status `xml:"Status"`
Assertion Assertion `xml:"Assertion"`
}
func NewResponse ¶
func NewResponse() *Response
func (*Response) AddAttributes ¶
func (*Response) AddAudience ¶
func (*Response) SetDestination ¶
func (*Response) SetDigestAlgorithm ¶
func (*Response) SetIdpCertificate ¶
func (*Response) SetInResponseTo ¶
func (*Response) SetSessionIndex ¶
func (*Response) SetSignatureAlgorithm ¶
type SPSSODescriptor ¶
type SPSSODescriptor struct {
XMLName xml.Name
ProtocolSupportEnumeration string `xml:"protocolSupportEnumeration,attr"`
SigningKeyDescriptor KeyDescriptor
EncryptionKeyDescriptor KeyDescriptor
// SingleLogoutService SingleLogoutService `xml:"SingleLogoutService"`
AssertionConsumerServices []AssertionConsumerService `xml:"AssertionConsumerServices"`
}
type SPSSODescriptors ¶
type SPSSODescriptors struct {
}
type SamlsigReference ¶
type SamlsigReference struct {
XMLName xml.Name
URI string `xml:"URI,attr"`
Transforms Transforms `xml:",innerxml"`
DigestMethod DigestMethod `xml:",innerxml"`
DigestValue DigestValue `xml:",innerxml"`
}
type SessionIndex ¶
type Signature ¶
type Signature struct {
XMLName xml.Name
SAMLSIG string `xml:"xmlns:ds,attr"`
SignedInfo SignedInfo
SignatureValue SignatureValue
KeyInfo KeyInfo
}
type SignatureMethod ¶
type SignatureValue ¶
type SignedInfo ¶
type SignedInfo struct {
XMLName xml.Name
CanonicalizationMethod CanonicalizationMethod
SignatureMethod SignatureMethod
SamlsigReference SamlsigReference
}
type SingleLogoutService ¶
type SingleSignOnService ¶
type Status ¶
type Status struct {
XMLName xml.Name
StatusCode StatusCode `xml:"StatusCode"`
}
type StatusCode ¶
type Subject ¶
type Subject struct {
XMLName xml.Name
NameID NameID
SubjectConfirmation SubjectConfirmation
}
type SubjectConfirmation ¶
type SubjectConfirmation struct {
XMLName xml.Name
Method string `xml:",attr"`
SubjectConfirmationData SubjectConfirmationData
}
type SubjectConfirmationData ¶
type Transforms ¶
type X509Certificate ¶
type X509Data ¶
type X509Data struct {
XMLName xml.Name
X509Certificate X509Certificate `xml:",innerxml"`
}
Click to show internal directories.
Click to hide internal directories.