package oidc
import "context"
type contextKey struct{}
type newSessionFlagKey struct{}
func NewContext(parent context.Context, c map[string]any) context.Context {
return context.WithValue(parent, contextKey{}, c)
}
func FromContext(ctx context.Context) map[string]any {
s, _ := ctx.Value(contextKey{}).(map[string]any)
return s
}
func NewContextSessionFlag(ctx context.Context, flag bool) context.Context {
return context.WithValue(ctx, newSessionFlagKey{}, flag)
}
func NewSessionFlagFromContext(ctx context.Context) bool {
s, _ := ctx.Value(newSessionFlagKey{}).(bool)
return s
}