func SessionFromContext(ctx context.Context) Session {
	v := ctx.Value(sessionIndex)
	if v == nil {
		return nil
	}
	return v.(Session)
}
SessionFromContext returns the session associated with ctx, or nil
if no session are associated
package samlsp
import (
	"context"
	"errors"
	"net/http"
	"github.com/crewjam/saml"
)
type Session interface{}
type SessionWithAttributes interface {
	Session
	GetAttributes() Attributes
}
var ErrNoSession = errors.New("saml: session not present")
type SessionProvider interface {
	CreateSession(w http.ResponseWriter, r *http.Request, assertion *saml.Assertion) error
	DeleteSession(w http.ResponseWriter, r *http.Request) error
	GetSession(r *http.Request) (Session, error)
}
type SessionCodec interface {
	New(assertion *saml.Assertion) (Session, error)
	Encode(s Session) (string, error)
	Decode(string) (Session, error)
}
type indexType int
const sessionIndex indexType = iota