Documentation ¶
Index ¶
- func LoadCertificate(crtFile string) (*x509.Certificate, error)
- func LoadCertificateFromBytes(cert []byte) (*x509.Certificate, error)
- type AccountSettings
- type AppSettings
- type AuthnContextClassRef
- type AuthnRequest
- type AuthorizationRequest
- type Issuer
- type NameIDPolicy
- type RequestedAuthnContext
- type Response
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadCertificate ¶
func LoadCertificate(crtFile string) (*x509.Certificate, error)
func LoadCertificateFromBytes ¶
func LoadCertificateFromBytes(cert []byte) (*x509.Certificate, error)
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"` 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"` }
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"));
type NameIDPolicy ¶
type RequestedAuthnContext ¶
type Response ¶
type Response struct { XmlDoc string Settings AccountSettings // contains filtered or unexported fields }
Click to show internal directories.
Click to hide internal directories.