// NewPubtktAuth creates a pubtkt authorization from an arbitrary data buffer. // It is suggested to use NewPubtktAuthFromKeyFile. func NewPubtktAuth(publicKey interface{}) *PubtktAuth { return &PubtktAuth{ publicKey: publicKey, cache: timecache.New(100, 24*time.Hour), } }
// NewHydraAuth makes a new HydraAuth using the given fedoraPath // and object namespace. The namespace is prefixed to any objects identifiers // before lookup in Fedora. func NewHydraAuth(fedoraPath, namespace string) *HydraAuth { return &HydraAuth{ fedora: fedora.NewRemote(fedoraPath, namespace), cache: timecache.New(250, 5*time.Minute), } }