MCPcopy Create free account
hub / github.com/smallstep/cli / WithSSHPOPFile

Function WithSSHPOPFile

token/options.go:353–362  ·  view source on GitHub ↗

WithSSHPOPFile returns a Options that sets the header sshpop claims.

(certFile string, key interface{})

Source from the content-addressed store, hash-verified

351
352// WithSSHPOPFile returns a Options that sets the header sshpop claims.
353func WithSSHPOPFile(certFile string, key interface{}) Options {
354 return func(c *Claims) error {
355 certStrs, err := jose.ValidateSSHPOP(certFile, key)
356 if err != nil {
357 return errors.Wrap(err, "error validating SSH certificate and key for use in sshpop header")
358 }
359 c.SetHeader("sshpop", certStrs)
360 return nil
361 }
362}

Callers 1

generateSSHPOPTokenFunction · 0.92

Calls 1

SetHeaderMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…