MCPcopy Create free account
hub / github.com/crewjam/saml / attributeValueString

Function attributeValueString

samlsp/session_jwt.go:148–153  ·  view source on GitHub ↗

attributeValueString returns the string form of a SAML AttributeValue. Some attributes, such as eduPersonTargetedID, carry a element instead of text content. For those the NameID's value is returned; the AttributeValue's own character data is then only (possibly empty) whitespace arou

(value saml.AttributeValue)

Source from the content-addressed store, hash-verified

146// AttributeValue's own character data is then only (possibly empty)
147// whitespace around the child element.
148func attributeValueString(value saml.AttributeValue) string {
149 if value.NameID != nil {
150 return value.NameID.Value
151 }
152 return value.Value
153}
154
155// Encode returns a serialized version of the Session.
156//

Callers 1

NewMethod · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected