WithSSHPOPFile returns a Options that sets the header sshpop claims.
(certFile string, key interface{})
| 351 | |
| 352 | // WithSSHPOPFile returns a Options that sets the header sshpop claims. |
| 353 | func 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 | } |
no test coverage detected
searching dependent graphs…