MCPcopy Index your code
hub / github.com/koding/kite / Verify

Method Verify

kontrol/kontrol.go:205–212  ·  view source on GitHub ↗

Verify is used for token and kiteKey authenticators to verify client's kontrol keys. In order to allow for graceful key updates deleted keys are allowed. If Config.VerifyFunc is nil during Kontrol instantiation with one of New* functions, this is the default verify method used by kontrol kite.

(pub string)

Source from the content-addressed store, hash-verified

203// one of New* functions, this is the default verify method
204// used by kontrol kite.
205func (k *Kontrol) Verify(pub string) error {
206 switch err := k.keyPair.IsValid(pub); err {
207 case nil, ErrKeyDeleted:
208 return nil
209 default:
210 return err
211 }
212}
213
214func (k *Kontrol) AddAuthenticator(keyType string, fn func(*kite.Request) error) {
215 k.Kite.Authenticators[keyType] = fn

Callers

nothing calls this directly

Calls 1

IsValidMethod · 0.65

Tested by

no test coverage detected