func WithUIOptions(opts ...ui.Option) Option {
	return func(ctx *context) error {
		ctx.uiOptions = opts
		return nil
	}
}
WithUIOptions adds UI package options to the password prompts.
package jose
import (
	"github.com/smallstep/cli/ui"
	"github.com/smallstep/cli/utils"
)
type context struct {
	use, alg, kid    string
	subtle, insecure bool
	noDefaults       bool
	password         []byte
	uiOptions        []ui.Option
}
func (ctx *context) apply(opts ...Option) (*context, error) {
	for _, opt := range opts {
		if err := opt(ctx); err != nil {
			return nil, err
		}
	}
	return ctx, nil
}
type Option func(ctx *context) error
func WithUse(use string) Option {
	return func(ctx *context) error {
		ctx.use = use
		return nil
	}
}
func WithAlg(alg string) Option {
	return func(ctx *context) error {
		ctx.alg = alg
		return nil
	}
}
func WithKid(kid string) Option {
	return func(ctx *context) error {
		ctx.kid = kid
		return nil
	}
}
func WithSubtle(subtle bool) Option {
	return func(ctx *context) error {
		ctx.subtle = subtle
		return nil
	}
}
func WithInsecure(insecure bool) Option {
	return func(ctx *context) error {
		ctx.insecure = insecure
		return nil
	}
}
func WithNoDefaults(val bool) Option {
	return func(ctx *context) error {
		ctx.noDefaults = val
		return nil
	}
}
func WithPassword(pass []byte) Option {
	return func(ctx *context) error {
		ctx.password = pass
		return nil
	}
}
func WithPasswordFile(filename string) Option {
	return func(ctx *context) error {
		b, err := utils.ReadPasswordFromFile(filename)
		if err != nil {
			return err
		}
		ctx.password = b
		return nil
	}
}