MCPcopy Index your code
hub / github.com/smallstep/cli / WithCustomAttributes

Function WithCustomAttributes

utils/cautils/certificate_flow.go:94–103  ·  view source on GitHub ↗

WithCustomAttributes adds custom attributes to be set in the "user" claim.

(v map[string]interface{})

Source from the content-addressed store, hash-verified

92
93// WithCustomAttributes adds custom attributes to be set in the "user" claim.
94func WithCustomAttributes(v map[string]interface{}) Option {
95 return newFuncFlowOption(func(fo *flowContext) {
96 if fo.CustomAttributes == nil {
97 fo.CustomAttributes = make(map[string]interface{})
98 }
99 for k, val := range v {
100 fo.CustomAttributes[k] = val
101 }
102 })
103}
104
105// NewCertificateFlow initializes a cli flow to get a new certificate.
106func NewCertificateFlow(ctx *cli.Context, opts ...Option) (*CertificateFlow, error) {

Callers 1

tokenActionFunction · 0.92

Calls 1

newFuncFlowOptionFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…