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

Function checkRelayState

redirect_binding.go:349–354  ·  view source on GitHub ↗

checkRelayState refuses a RelayState longer than MaxRelayStateLength if limit is set (see ServiceProvider.LimitRelayStateLength and IdentityProvider.LimitRelayStateLength). It is checked where this package starts an exchange (AuthnRequests, LogoutRequests and IdP-initiated Responses), not where it e

(limit bool, relayState string)

Source from the content-addressed store, hash-verified

347// Responses), not where it echoes the RelayState of a message it answers,
348// which must be returned unchanged.
349func checkRelayState(limit bool, relayState string) error {
350 if limit && len(relayState) > MaxRelayStateLength {
351 return fmt.Errorf("RelayState is %d bytes, longer than the %d the SAML bindings allow: %w", len(relayState), MaxRelayStateLength, ErrRelayStateTooLong)
352 }
353 return nil
354}
355
356// redirectBindingURL returns destination with the HTTP-Redirect binding
357// parameters for encodedMessage appended. If signatureMethod is set the

Callers 7

RedirectMethod · 0.85
MakePostLogoutRequestMethod · 0.85
SimpleSignWithNonceMethod · 0.85
SimpleSignWithNonceMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected