Documentation
¶
Index ¶
- Variables
- func ACSService(w http.ResponseWriter, r *http.Request) (err error)
- func Attributesc14n(response, idpMd, spMd *goxml.Xp)
- func BirkSLOService(w http.ResponseWriter, r *http.Request) (err error)
- func CopyAttributes(sourceResponse, response, spMd *goxml.Xp) (ardValues map[string][]string, ardHash string)
- func HSMStatus(w http.ResponseWriter, r *http.Request) (err error)
- func IdPSLOService(w http.ResponseWriter, r *http.Request) (err error)
- func KribSLOService(w http.ResponseWriter, r *http.Request) (err error)
- func MDQWeb(w http.ResponseWriter, r *http.Request) (err error)
- func Main()
- func OkService(w http.ResponseWriter, r *http.Request) (err error)
- func RequestHandler(request, idpMd, spMd *goxml.Xp) (values map[string][]string, 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 VeryVeryPoorMansScopingService(w http.ResponseWriter, r *http.Request) (err error)
- type AttributeReleaseData
- type HybridSession
- type MdSets
- type WayfHybridConfig
Examples ¶
Constants ¶
This section is empty.
Variables ¶
var ( AttributeDescriptions = attributeDescriptionsMap{} AttributeDescriptionsList = attributeDescriptionsListtype{} )
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 Attributesc14n ¶ added in v1.0.17
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 CopyAttributes ¶ added in v1.0.13
func CopyAttributes(sourceResponse, response, spMd *goxml.Xp) (ardValues map[string][]string, ardHash string)
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: cn urn:oid:2.5.4.3 urn:oasis:names:tc:SAML:2.0:attrname-format:uri Mads Freek Petersen displayName urn:oid:2.16.840.1.113730.3.1.241 urn:oasis:names:tc:SAML:2.0:attrname-format:uri Mads Freek Petersen eduPersonAssurance urn:oid:1.3.6.1.4.1.5923.1.1.1.11 urn:oasis:names:tc:SAML:2.0:attrname-format:uri 2 eduPersonEntitlement 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 eduPersonPrimaryAffiliation urn:oid:1.3.6.1.4.1.5923.1.1.1.5 urn:oasis:names:tc:SAML:2.0:attrname-format:uri staff eduPersonPrincipalName 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 eduPersonScopedAffiliation 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 eduPersonTargetedID 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 gn urn:oid:2.5.4.42 urn:oasis:names:tc:SAML:2.0:attrname-format:uri Mads Freek mail urn:oid:0.9.2342.19200300.100.1.3 urn:oasis:names:tc:SAML:2.0:attrname-format:uri madpe@dtu.dk organizationName urn:oid:2.5.4.10 urn:oasis:names:tc:SAML:2.0:attrname-format:uri Danmarks Tekniske Universitet preferredLanguage urn:oid:2.16.840.1.113730.3.1.39 urn:oasis:names:tc:SAML:2.0:attrname-format:uri da-DK schacDateOfBirth urn:oid:1.3.6.1.4.1.25178.1.2.3 urn:oasis:names:tc:SAML:2.0:attrname-format:uri 18580824 schacHomeOrganization urn:oid:1.3.6.1.4.1.25178.1.2.9 urn:oasis:names:tc:SAML:2.0:attrname-format:uri dtu.dk schacHomeOrganizationType 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 schacPersonalUniqueID 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 schacYearOfBirth urn:oid:1.3.6.1.4.1.25178.1.0.2.3 urn:oasis:names:tc:SAML:2.0:attrname-format:uri 1858 sn urn:oid:2.5.4.4 urn:oasis:names:tc:SAML:2.0:attrname-format:uri Petersen
func HSMStatus ¶ added in v1.0.17
func HSMStatus(w http.ResponseWriter, r *http.Request) (err error)
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 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 RequestHandler ¶ added in v1.0.17
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 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)
func WayfKribHandler ¶
func WayfKribHandler(idpMd, spMd, request, response *goxml.Xp) (ard AttributeReleaseData, err error)
type HybridSession ¶
type WayfHybridConfig ¶ added in v1.0.17
type WayfHybridConfig struct {
Path string
DiscoveryService string
Domain string
HubEntityID string
EptidSalt string
SecureCookieHashKey string
PostFormTemplate string
AttributeReleaseTemplate, WayfSPTestServiceTemplate string
Certpath string
Intf, Hubrequestedattributes, Sso_Service, Https_Key, Https_Cert, Acs, Vvpmss string
Birk, Krib, Dsbackend, Dstiming, Public, Discopublicpath, Discometadata, Discospmetadata string
Testsp, Testsp_Acs, Testsp_Slo, Testsp2, Testsp2_Acs, Testsp2_Slo, MDQ string
Eidas_Acs, Nemlogin_Acs, CertPath, SamlSchema, ConsentAsAService string
Idpslo, Birkslo, Spslo, Kribslo, Nemloginslo, Saml2jwt, Jwt2saml, SaltForHashedEppn string
ElementsToSign []string
NotFoundRoutes []string
Hub, Internal, ExternalIdP, ExternalSP struct{ Path, Table string }
MetadataFeeds []struct{ Path, URL string }
GoEleven goElevenConfig
IdpRemapSource []struct{ Key, Idp, Sp string }
}