Ejemplo n.º 1
// 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),
Ejemplo n.º 2
// 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),