Documentation ¶
Index ¶
- func LoadCertificate(crtFile string) (string, error)
- type AccountSettings
- type AppSettings
- type AuthnContextClassRef
- type AuthnRequest
- type AuthnSignedRequest
- type AuthorizationRequest
- type CanonicalizationMethod
- type DigestMethod
- type DigestValue
- type Issuer
- type KeyInfo
- type NameIDPolicy
- type RequestedAuthnContext
- type Response
- type SamlsigReference
- type Signature
- type SignatureMethod
- type SignatureValue
- type SignedInfo
- type Transform
- type Transforms
- type X509Certificate
- type X509Data
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCertificate ¶
Types ¶
type AccountSettings ¶
func NewAccountSettings ¶
func NewAccountSettings(cert string, targetUrl string) *AccountSettings
type AppSettings ¶
func NewAppSettings ¶
func NewAppSettings(assertionServiceUrl string, issuer string) *AppSettings
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,omitempty"` IssueInstant string `xml:"IssueInstant,attr"` AttributeConsumingServiceIndex int `xml:"AttributeConsumingServiceIndex,attr"` AssertionConsumerServiceIndex int `xml:"AssertionConsumerServiceIndex,attr,omitempty"` Issuer Issuer `xml:"Issuer"` NameIDPolicy NameIDPolicy `xml:"NameIDPolicy"` RequestedAuthnContext RequestedAuthnContext `xml:"RequestedAuthnContext"` }
type AuthnSignedRequest ¶
type AuthnSignedRequest struct { XMLName xml.Name SAMLP string `xml:"xmlns:samlp,attr"` SAML string `xml:"xmlns:saml,attr"` SAMLSIG string `xml:"xmlns:samlsig,attr"` ID string `xml:"ID,attr"` Version string `xml:"Version,attr"` ProtocolBinding string `xml:"ProtocolBinding,attr"` AssertionConsumerServiceURL string `xml:"AssertionConsumerServiceURL,attr"` IssueInstant string `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"` AuthnContextClassRef AuthnContextClassRef `xml:"AuthnContextClassRef"` Signature Signature `xml:"Signature"` }
type AuthorizationRequest ¶
type AuthorizationRequest struct { Id string IssueInstant string AppSettings AppSettings AccountSettings AccountSettings Base64 int }
func NewAuthorizationRequest ¶
func NewAuthorizationRequest(appSettings AppSettings, accountSettings AccountSettings) *AuthorizationRequest
func (AuthorizationRequest) GetRequest ¶
func (ar AuthorizationRequest) GetRequest(base64Encode bool) (string, error)
GetRequest returns a string formatted XML document that represents the SAML document TODO: parameterize more parts of the request
func (AuthorizationRequest) GetRequestUrl ¶
func (ar AuthorizationRequest) GetRequestUrl() (string, error)
String reqString = accSettings.getIdp_sso_target_url()+"?SAMLRequest=" + AuthRequest.getRidOfCRLF(URLEncoder.encode(authReq.getRequest(AuthRequest.base64),"UTF-8"));
func (AuthorizationRequest) GetSignedRequest ¶
func (ar AuthorizationRequest) GetSignedRequest(base64Encode bool, publicCert string, privateCert string) (string, error)
GetSignedRequest returns a string formatted XML document that represents the SAML document TODO: parameterize more parts of the request
type CanonicalizationMethod ¶
type DigestMethod ¶
type DigestValue ¶
type NameIDPolicy ¶
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 { XmlDoc string Settings AccountSettings // contains filtered or unexported fields }
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 Signature ¶
type Signature struct { XMLName xml.Name Id string `xml:"Id,attr"` SignedInfo SignedInfo `xml:",innerxml"` SignatureValue SignatureValue `xml:",innerxml"` KeyInfo KeyInfo `xml:",innerxml"` }
type SignatureMethod ¶
type SignatureValue ¶
type SignedInfo ¶
type SignedInfo struct { XMLName xml.Name CanonicalizationMethod CanonicalizationMethod `xml:",innerxml"` SignatureMethod SignatureMethod `xml:",innerxml"` SamlsigReference SamlsigReference `xml:",innerxml"` }
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.