forked from hashicorp/vault
/
request_handling_util.go
47 lines (34 loc) · 1.17 KB
/
request_handling_util.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
// +build !enterprise
package vault
import (
"context"
"github.com/hashicorp/vault/helper/identity"
"github.com/hashicorp/vault/logical"
)
func waitForReplicationState(context.Context, *Core, *logical.Request) error { return nil }
func checkNeedsCG(context.Context, *Core, *logical.Request, *logical.Auth, error, []string) (error, *logical.Response, *logical.Auth, error) {
return nil, nil, nil, nil
}
func checkErrControlGroupTokenNeedsCreated(err error) bool {
return false
}
func shouldForward(c *Core, routeErr error) bool {
return false
}
func syncCounter(c *Core) {
}
func couldForward(c *Core) bool {
return false
}
func forward(ctx context.Context, c *Core, req *logical.Request) (*logical.Response, error) {
panic("forward called in OSS Vault")
}
func getLeaseRegisterFunc(c *Core) (func(context.Context, *logical.Request, *logical.Response) (string, error), error) {
return c.expiration.Register, nil
}
func getAuthRegisterFunc(c *Core) (RegisterAuthFunc, error) {
return c.RegisterAuth, nil
}
func possiblyForwardAliasCreation(ctx context.Context, c *Core, inErr error, auth *logical.Auth, entity *identity.Entity) (*identity.Entity, error) {
return entity, inErr
}