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

Interface SessionCodec

samlsp/session.go:56–69  ·  view source on GitHub ↗

SessionCodec is an interface to convert SAML assertions to a Session. The default implementation uses JWTs, JWTSessionCodec.

Source from the content-addressed store, hash-verified

54// SessionCodec is an interface to convert SAML assertions to a
55// Session. The default implementation uses JWTs, JWTSessionCodec.
56type SessionCodec interface {
57 // New creates a Session from the SAML assertion.
58 New(assertion *saml.Assertion) (Session, error)
59
60 // Encode returns a serialized version of the Session.
61 //
62 // Note: When implementing this function, it is reasonable to expect that
63 // Session is of the exact type returned by New(), and panic if it is not.
64 Encode(s Session) (string, error)
65
66 // Decode parses the serialized session that may have been returned by Encode
67 // and returns a Session.
68 Decode(string) (Session, error)
69}
70
71type indexType int
72

Implementers 3

stubSessionCodecsamlsp/session_cookie_secure_test.go
JWTSessionCodecsamlsp/session_jwt.go
opaqueSessionCodecsamlsp/session_revocation_codec_test.g

Calls

no outgoing calls

Tested by

no test coverage detected