Documentation
¶
Index ¶
- func ACSService(w http.ResponseWriter, r *http.Request) (err error)
- func BirkSLOService(w http.ResponseWriter, r *http.Request) (err error)
- func BirkService(w http.ResponseWriter, r *http.Request) (err error)
- func CopyAttributes(sourceResponse, response, spMd *goxml.Xp)
- func IdPSLOService(w http.ResponseWriter, r *http.Request) (err error)
- func IdWayfDkACSService(w http.ResponseWriter, r *http.Request) (err error)
- func IdWayfDkSSOService(w http.ResponseWriter, r *http.Request) (err error)
- func KribSLOService(w http.ResponseWriter, r *http.Request) (err error)
- func KribService(w http.ResponseWriter, r *http.Request) (err error)
- func Main()
- func OkService(w http.ResponseWriter, r *http.Request) (err error)
- func SLOInfoHandler(w http.ResponseWriter, r *http.Request, ...) (sloinfo *gosaml.SLOInfo, err error)
- func SLOService(w http.ResponseWriter, r *http.Request, ...) (err error)
- func SPSLOService(w http.ResponseWriter, r *http.Request) (err error)
- func SSOService(w http.ResponseWriter, r *http.Request) (err error)
- func SloRequest(w http.ResponseWriter, r *http.Request, ...)
- func SloResponse(w http.ResponseWriter, r *http.Request, request, issuer, destination *goxml.Xp)
- func VeryVeryPoorMansScopingService(w http.ResponseWriter, r *http.Request) (err error)
- func WayfKribHandler(response, birkMd, kribMd *goxml.Xp) (destination string, err error)
- type AttributeReleaseData
- type HybridSession
- type MdSets
- type SigningMethodHSM
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ACSService ¶
func ACSService(w http.ResponseWriter, r *http.Request) (err error)
ACSService handles all the stuff related to receiving response and attribute handling
func BirkSLOService ¶
func BirkSLOService(w http.ResponseWriter, r *http.Request) (err error)
BirkSLOService refers to birk single logout service. Takes request as a parameter and returns an error if any
func BirkService ¶
func BirkService(w http.ResponseWriter, r *http.Request) (err error)
BirkService refers to handling the request at Birk
func CopyAttributes ¶ added in v1.0.13
CopyAttributes copies the attributes
Example ¶
idpMd := goxml.NewXpFromFile("testdata/idp_md_dtu.xml")
hubMd := goxml.NewXpFromFile("testdata/hub_md.xml")
spMd := goxml.NewXpFromFile("testdata/sp_md.xml")
prepareTables(hubMd)
sourceResponse := goxml.NewXpFromFile("testdata/sourceresponse_dtu.saml")
WayfACSServiceHandler(idpMd, hubMd, spMd, nil, sourceResponse.CpXp(), false)
newresponse := gosaml.NewResponse(idpMd, spMd, sourceResponse, sourceResponse)
CopyAttributes(sourceResponse, newresponse, spMd)
gosaml.AttributeCanonicalDump(os.Stdout, newresponse)
Output: urn:oid:0.9.2342.19200300.100.1.3 urn:oasis:names:tc:SAML:2.0:attrname-format:uri madpe@dtu.dk urn:oid:1.3.6.1.4.1.25178.1.0.2.3 urn:oasis:names:tc:SAML:2.0:attrname-format:uri 1858 urn:oid:1.3.6.1.4.1.25178.1.2.10 urn:oasis:names:tc:SAML:2.0:attrname-format:uri urn:mace:terena.org:schac:homeOrganizationType:eu:higherEducationalInstitution urn:oid:1.3.6.1.4.1.25178.1.2.15 urn:oasis:names:tc:SAML:2.0:attrname-format:uri urn:mace:terena.org:schac:personalUniqueID:dk:CPR:2408588834 urn:oid:1.3.6.1.4.1.25178.1.2.3 urn:oasis:names:tc:SAML:2.0:attrname-format:uri 18580824 urn:oid:1.3.6.1.4.1.25178.1.2.9 urn:oasis:names:tc:SAML:2.0:attrname-format:uri dtu.dk urn:oid:1.3.6.1.4.1.5923.1.1.1.10 urn:oasis:names:tc:SAML:2.0:attrname-format:uri WAYF-DK-9c03f6bdabf9e280d9dfdedb42ebaf161c30ed51 urn:oid:1.3.6.1.4.1.5923.1.1.1.11 urn:oasis:names:tc:SAML:2.0:attrname-format:uri 2 urn:oid:1.3.6.1.4.1.5923.1.1.1.5 urn:oasis:names:tc:SAML:2.0:attrname-format:uri staff urn:oid:1.3.6.1.4.1.5923.1.1.1.6 urn:oasis:names:tc:SAML:2.0:attrname-format:uri madpe@dtu.dk urn:oid:1.3.6.1.4.1.5923.1.1.1.7 urn:oasis:names:tc:SAML:2.0:attrname-format:uri this.is.a.prefix.with.an.allowed.postfix this.is.an.allowed.infix.with.a.postfix this.is.an.allowed.prefix.with.a.postfix this.is.an.allowed.regexp.with.a.postfix urn:mace:terena.org:tcs:escience-user urn:oid:1.3.6.1.4.1.5923.1.1.1.9 urn:oasis:names:tc:SAML:2.0:attrname-format:uri member@dtu.dk staff@dtu.dk staff@just.testing.dtu.dk urn:oid:2.16.840.1.113730.3.1.241 urn:oasis:names:tc:SAML:2.0:attrname-format:uri Mads Freek Petersen urn:oid:2.16.840.1.113730.3.1.39 urn:oasis:names:tc:SAML:2.0:attrname-format:uri da-DK urn:oid:2.5.4.10 urn:oasis:names:tc:SAML:2.0:attrname-format:uri Danmarks Tekniske Universitet urn:oid:2.5.4.3 urn:oasis:names:tc:SAML:2.0:attrname-format:uri Mads Freek Petersen urn:oid:2.5.4.4 urn:oasis:names:tc:SAML:2.0:attrname-format:uri Petersen urn:oid:2.5.4.42 urn:oasis:names:tc:SAML:2.0:attrname-format:uri Mads Freek
func IdPSLOService ¶
func IdPSLOService(w http.ResponseWriter, r *http.Request) (err error)
IdPSLOService refers to idp single logout service. Takes request as a parameter and returns an error if any
func IdWayfDkACSService ¶
func IdWayfDkACSService(w http.ResponseWriter, r *http.Request) (err error)
func IdWayfDkSSOService ¶
func IdWayfDkSSOService(w http.ResponseWriter, r *http.Request) (err error)
func KribSLOService ¶
func KribSLOService(w http.ResponseWriter, r *http.Request) (err error)
KribSLOService refers to krib single logout service. Takes request as a parameter and returns an error if any
func KribService ¶
func KribService(w http.ResponseWriter, r *http.Request) (err error)
KribService handles all the request at Krib part. Returns an error if something goes wrong.
func SLOInfoHandler ¶
func SLOInfoHandler(w http.ResponseWriter, r *http.Request, samlIn, destinationInMd, samlOut, destinationOutMd *goxml.Xp, role int, tag string) (sloinfo *gosaml.SLOInfo, err error)
Saves or retrieves the SLO info relevant to the contents of the samlMessage For now uses cookies to keep the SLOInfo
func SLOService ¶
func SLOService(w http.ResponseWriter, r *http.Request, issuerMdSet, destinationMdSet gosaml.Md, finalIssuerMdSets, finalDestinationMdSets []gosaml.Md, role int, tag string) (err error)
SLOService refers to single logout service. Takes request and issuer and destination metadata sets, role refers to if it as IDP or SP.
func SPSLOService ¶
func SPSLOService(w http.ResponseWriter, r *http.Request) (err error)
SPSLOService refers to SP single logout service. Takes request as a parameter and returns an error if any
func SSOService ¶
func SSOService(w http.ResponseWriter, r *http.Request) (err error)
SSOService handles single sign on requests
func SloRequest ¶
func SloRequest(w http.ResponseWriter, r *http.Request, response, issuer, destination *goxml.Xp, pk string)
SloRequest generates a single logout request
func SloResponse ¶
SloResponse generates a single logout reponse
func VeryVeryPoorMansScopingService ¶
func VeryVeryPoorMansScopingService(w http.ResponseWriter, r *http.Request) (err error)
VeryVeryPoorMansScopingService handles poors man scoping
Types ¶
type AttributeReleaseData ¶
type AttributeReleaseData struct {
Values map[string][]string
IdPDisplayName map[string]string
IdPLogo string
IdPEntityID string
SPDisplayName map[string]string
SPDescription map[string]string
SPLogo string
SPEntityID string
Key string
Hash string
BypassConfirmation bool
ForceConfirmation bool
ConsentAsAService string
}
func WayfACSServiceHandler ¶
func WayfACSServiceHandler(idpMd, hubMd, spMd, request, response *goxml.Xp, birk bool) (ard AttributeReleaseData, err error)
type HybridSession ¶
type SigningMethodHSM ¶ added in v1.0.14
type SigningMethodHSM struct {
Name, Algo string
}
Implements the WAYF specific HSM RSA signingMethod Expects "PEM" private key format ie. when for HSM it starts with hsm:
var (
SigningMethodHSM256 *SigningMethodHSM
)
Specific instances for RS256 and company
func (*SigningMethodHSM) Alg ¶ added in v1.0.14
func (m *SigningMethodHSM) Alg() string
func (*SigningMethodHSM) Sign ¶ added in v1.0.14
func (m *SigningMethodHSM) Sign(signingString string, key interface{}) (string, error)
func (*SigningMethodHSM) Verify ¶ added in v1.0.14
func (m *SigningMethodHSM) Verify(signingString, signature string, key interface{}) error